Merge remote-tracking branch 'upstream/4.4' into 4.4-4.5-2014-09-29-13-10-47
[civicrm-core.git] / CRM / Core / FileSearchInterface.php
CommitLineData
6cccc6d4
TO
1<?php
2interface CRM_Core_FileSearchInterface {
3 const DEFAULT_SEARCH_LIMIT = 20;
4 const DEFAULT_SEARCH_OFFSET = 0;
5
6 /**
7 * @param array $query any of the following:
8 * - text: string, plain text to search for
9 * - parent_table: string - entity to which file is directly attached
10 * - parent_id: int - entity to which file is directly attached
11 * - xparent_table: string - business-entity to which file is attached (directly or indirectly)
12 * - xparent_id: int - business-entity to which file is attached (directly or indirectly)
13 * @param int $limit
14 * @param int $offset
15 * @return array each item has keys:
16 * - file_id: int
17 * - parent_table: string - entity to which file is directly attached
18 * - parent_id: int - entity to which file is directly attached
19 * - xparent_table: string - business-entity to which file is attached (directly or indirectly)
20 * - xparent_id: int - business-entity to which file is attached (directly or indirectly)
21 */
22 function search($query, $limit = self::DEFAULT_SEARCH_LIMIT, $offset = self::DEFAULT_SEARCH_OFFSET);
23}