1 | <?php |
||
24 | class EntryFilter extends ApiObject |
||
25 | { |
||
26 | private static $filterMapping = [ |
||
27 | 'contains' => 'Contains', |
||
28 | 'doesNotContain' => 'Does_not_contain', |
||
29 | 'beginsWith' => 'Begins_with', |
||
30 | 'endsWith' => 'Ends_with', |
||
31 | 'lessThan' => 'Is_less_than', |
||
32 | 'greaterThan' => 'Is_greater_than', |
||
33 | 'on' => 'Is_on', |
||
34 | 'before' => 'Is_before', |
||
35 | 'after' => 'Is_after', |
||
36 | 'equals' => 'Is_equal_to', |
||
37 | 'notEqualTo' => 'Is_not_equal_to', |
||
38 | 'notNull' => 'Is_not_NULL', |
||
39 | ]; |
||
40 | |||
41 | private $fieldName; |
||
42 | private $filter; |
||
43 | private $value; |
||
44 | |||
45 | public function __construct($fieldName) |
||
49 | |||
50 | public function __toString() |
||
68 | |||
69 | public function __call($name, $arguments) |
||
76 | |||
77 | /** |
||
78 | * Convenience function to create an EntryFilter that can be used for immediate chaining. |
||
79 | * |
||
80 | * @api |
||
81 | * |
||
82 | * @param string $field The API Field ID to use in this filter |
||
83 | * |
||
84 | * @since 0.1.0 |
||
85 | * |
||
86 | * @return EntryFilter |
||
87 | */ |
||
88 | public static function create($field) |
||
94 | } |
||
95 |