1 | <?php |
||
25 | class SearchFilter implements TransformatorFilterInterface |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * This will filter out: |
||
30 | * |
||
31 | * 1. Fields marked with: |
||
32 | * ``` |
||
33 | * @Search(false) |
||
34 | * ``` |
||
35 | * 2. Secret fields marked in any way with: |
||
36 | * ``` |
||
37 | * @Secret |
||
38 | * ``` |
||
39 | * 3. Non-persistent fields marked with: |
||
40 | * ``` |
||
41 | * @Persistent(false) |
||
42 | * ``` |
||
43 | * |
||
44 | * @param AnnotatedInterface $model |
||
45 | * @param DocumentPropertyMeta $fieldMeta |
||
46 | * @return boolean |
||
47 | */ |
||
48 | 54 | public function fromModel($model, DocumentPropertyMeta $fieldMeta) |
|
73 | |||
74 | /** |
||
75 | * Allow any previously set fields to be set. |
||
76 | * @param AnnotatedInterface $model |
||
77 | * @param DocumentPropertyMeta $fieldMeta |
||
78 | * @return boolean |
||
79 | */ |
||
80 | 26 | public function toModel($model, DocumentPropertyMeta $fieldMeta) |
|
84 | |||
85 | } |
||
86 |