1 | <?php |
||
12 | trait SearchTrait |
||
13 | { |
||
14 | /** |
||
15 | * @var array $searchFields |
||
16 | */ |
||
17 | private static $searchFields = [ ]; |
||
18 | |||
19 | /** |
||
20 | * @var array $boostFeilds |
||
21 | */ |
||
22 | private static $boostFeilds = [ ]; |
||
23 | |||
24 | /** |
||
25 | * Set up |
||
26 | * |
||
27 | * @throws \Exception |
||
28 | * @return void |
||
29 | */ |
||
30 | 17 | private static function setup() |
|
41 | |||
42 | /** |
||
43 | * Search Fields |
||
44 | * |
||
45 | * This should never get called. If it does get called, then it means that the Model which is using |
||
46 | * "SearchTrait" has not declared a "searchFields" method and made it static. |
||
47 | * |
||
48 | * @throws \Exception |
||
49 | */ |
||
50 | 1 | private static function searchFields() |
|
54 | |||
55 | /** |
||
56 | * @param array $fields |
||
57 | */ |
||
58 | 17 | public static function setSearchFields(array $fields) |
|
62 | |||
63 | /** |
||
64 | * @return array |
||
65 | */ |
||
66 | 2 | public static function getSearchFields() |
|
70 | |||
71 | /** |
||
72 | * @param array $fields |
||
73 | * @throws \Exception |
||
74 | */ |
||
75 | 2 | public static function setBoostFields(array $fields) |
|
84 | |||
85 | /** |
||
86 | * @return array |
||
87 | */ |
||
88 | 1 | public static function getBoostFields() |
|
92 | |||
93 | /** |
||
94 | * @return mixed |
||
95 | */ |
||
96 | 2 | public static function search() |
|
105 | |||
106 | /** |
||
107 | * @return void |
||
108 | */ |
||
109 | 17 | public static function bootSearchTrait() |
|
116 | |||
117 | /** |
||
118 | * @param Store $store |
||
119 | * @return \Closure |
||
120 | */ |
||
121 | 17 | private static function insertCallback(Store $store) |
|
128 | |||
129 | /** |
||
130 | * @param Store $store |
||
131 | * @return \Closure |
||
132 | */ |
||
133 | private static function deleteCallback(Store $store) |
||
140 | } |
||
|
|||
141 |
This check marks files that end in a newline character, i.e. an empy line.