1 | <?php declare(strict_types=1); |
||
9 | class Condition implements ConditionInterface |
||
10 | { |
||
11 | /** @var string Relation logic between arguments */ |
||
12 | public $relation = ConditionInterface::CONJUNCTION; |
||
13 | |||
14 | /** @var Argument[] Collection of condition arguments */ |
||
15 | protected $arguments = []; |
||
16 | |||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | */ |
||
20 | public function addArgument(ArgumentInterface $argument) |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function addCondition(ConditionInterface $condition) |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function size() |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function add($argument, $value, $relation = ArgumentInterface::EQUAL) |
||
59 | |||
60 | /** |
||
61 | * Constructor |
||
62 | * @param string $relation Relation type between arguments |
||
63 | */ |
||
64 | public function __construct($relation = ConditionInterface::CONJUNCTION) |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function current() |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function next() |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function key() |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function valid() |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function rewind() |
||
108 | } |
||
109 |