CRM-16373 - Move formatUnitSize() from CRM_Core_Config to CRM_Utils_Number
[civicrm-core.git] / CRM / Core / FileSearchInterface.php
1 <?php
2
3 /**
4 * Interface CRM_Core_FileSearchInterface
5 */
6 interface CRM_Core_FileSearchInterface {
7 const DEFAULT_SEARCH_LIMIT = 20;
8 const DEFAULT_SEARCH_OFFSET = 0;
9
10 /**
11 * @param array $query
12 * Any of the following:.
13 * - text: string, plain text to search for
14 * - parent_table: string - entity to which file is directly attached
15 * - parent_id: int - entity to which file is directly attached
16 * - xparent_table: string - business-entity to which file is attached (directly or indirectly)
17 * - xparent_id: int - business-entity to which file is attached (directly or indirectly)
18 * @param int $limit
19 * @param int $offset
20 * @return array
21 * each item has keys:
22 * - file_id: int
23 * - parent_table: string - entity to which file is directly attached
24 * - parent_id: int - entity to which file is directly attached
25 * - xparent_table: string - business-entity to which file is attached (directly or indirectly)
26 * - xparent_id: int - business-entity to which file is attached (directly or indirectly)
27 */
28 public function search($query, $limit = self::DEFAULT_SEARCH_LIMIT, $offset = self::DEFAULT_SEARCH_OFFSET);
29
30 }