1 | <?php |
||
24 | class Operator { |
||
25 | const OPERATION_AND = '{DAV:}and'; |
||
26 | const OPERATION_OR = '{DAV:}or'; |
||
27 | const OPERATION_NOT = '{DAV:}not'; |
||
28 | const OPERATION_EQUAL = '{DAV:}eq'; |
||
29 | const OPERATION_LESS_THAN = '{DAV:}lt'; |
||
30 | const OPERATION_LESS_OR_EQUAL_THAN = '{DAV:}lte'; |
||
31 | const OPERATION_GREATER_THAN = '{DAV:}gt'; |
||
32 | const OPERATION_GREATER_OR_EQUAL_THAN = '{DAV:}gte'; |
||
33 | const OPERATION_IS_COLLECTION = '{DAV:}is-collection'; |
||
34 | const OPERATION_IS_DEFINED = '{DAV:}is-defined'; |
||
35 | const OPERATION_IS_LIKE = '{DAV:}like'; |
||
36 | const OPERATION_CONTAINS = '{DAV:}contains'; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | * |
||
41 | * The type of operation, one of the Operator::OPERATION_* constants |
||
42 | */ |
||
43 | public $type; |
||
44 | /** |
||
45 | * @var (Literal|SearchPropDefinition|Operation)[] |
||
46 | * |
||
47 | * The list of arguments for the operation |
||
48 | * |
||
49 | * - SearchPropDefinition: property for comparison |
||
50 | * - Literal: literal value for comparison |
||
51 | * - Operation: nested operation for and/or/not operations |
||
52 | * |
||
53 | * Which type and what number of argument an Operator takes depends on the operator type. |
||
54 | */ |
||
55 | public $arguments; |
||
56 | |||
57 | /** |
||
58 | * Operator constructor. |
||
59 | * |
||
60 | * @param string $type |
||
61 | * @param array $arguments |
||
62 | */ |
||
63 | public function __construct($type = '', array $arguments = []) { |
||
67 | } |
||
68 |