1 | <?php |
||
36 | class Selector extends Specification implements SelectorInterface |
||
|
|||
37 | { |
||
38 | /** |
||
39 | * @var SelectorInterface |
||
40 | */ |
||
41 | protected $selector; |
||
42 | |||
43 | /** |
||
44 | * @param SelectorInterface $selector |
||
45 | */ |
||
46 | public function __construct(SelectorInterface $selector) |
||
50 | |||
51 | /** |
||
52 | * @return \Cubiche\Core\Selector\SelectorInterface |
||
53 | */ |
||
54 | public function selector() |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function evaluate($value) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function __invoke() |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function apply($value) |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function select(callable $selector) |
||
90 | |||
91 | /** |
||
92 | * @param string $key |
||
93 | * |
||
94 | * @return \Cubiche\Core\Specification\Selector |
||
95 | */ |
||
96 | public function key($key) |
||
100 | |||
101 | /** |
||
102 | * @param string $property |
||
103 | * |
||
104 | * @return \Cubiche\Core\Specification\Selector |
||
105 | */ |
||
106 | public function property($property) |
||
110 | |||
111 | /** |
||
112 | * @param string $method |
||
113 | * |
||
114 | * @return \Cubiche\Core\Specification\Selector |
||
115 | */ |
||
116 | public function method($method) |
||
120 | |||
121 | /** |
||
122 | * @param callable $callable |
||
123 | * |
||
124 | * @return \Cubiche\Core\Specification\Selector |
||
125 | */ |
||
126 | public function custom(callable $callable) |
||
130 | |||
131 | /** |
||
132 | * @return \Cubiche\Core\Specification\Selector |
||
133 | */ |
||
134 | public function count() |
||
138 | |||
139 | /** |
||
140 | * @param SpecificationInterface $specification |
||
141 | * |
||
142 | * @return \Cubiche\Core\Specification\Quantifier\All |
||
143 | */ |
||
144 | public function all(SpecificationInterface $specification) |
||
148 | |||
149 | /** |
||
150 | * @param int $count |
||
151 | * @param SpecificationInterface $specification |
||
152 | * |
||
153 | * @return \Cubiche\Core\Specification\Quantifier\AtLeast |
||
154 | */ |
||
155 | public function atLeast($count, SpecificationInterface $specification) |
||
159 | |||
160 | /** |
||
161 | * @param SpecificationInterface $specification |
||
162 | * |
||
163 | * @return \Cubiche\Core\Specification\Quantifier\AtLeast |
||
164 | */ |
||
165 | public function any(SpecificationInterface $specification) |
||
169 | |||
170 | /** |
||
171 | * @param SelectorInterface|mixed $value |
||
172 | * |
||
173 | * @return \Cubiche\Domain\Specification\Constraint\GreaterThan |
||
174 | */ |
||
175 | public function gt($value) |
||
179 | |||
180 | /** |
||
181 | * @param SelectorInterface|mixed $value |
||
182 | * |
||
183 | * @return \Cubiche\Core\Specification\Constraint\GreaterThanEqual |
||
184 | */ |
||
185 | public function gte($value) |
||
189 | |||
190 | /** |
||
191 | * @param SelectorInterface|mixed $value |
||
192 | * |
||
193 | * @return \Cubiche\Core\Specification\Constraint\LessThan |
||
194 | */ |
||
195 | public function lt($value) |
||
199 | |||
200 | /** |
||
201 | * @param SelectorInterface|mixed $value |
||
202 | * |
||
203 | * @return \Cubiche\Core\Specification\Constraint\LessThanEqual |
||
204 | */ |
||
205 | public function lte($value) |
||
209 | |||
210 | /** |
||
211 | * @param SelectorInterface|mixed $value |
||
212 | * |
||
213 | * @return \Cubiche\Core\Specification\Constraint\Equal |
||
214 | */ |
||
215 | public function eq($value) |
||
219 | |||
220 | /** |
||
221 | * @param SelectorInterface|mixed $value |
||
222 | * |
||
223 | * @return \Cubiche\Core\Specification\Constraint\NotEqual |
||
224 | */ |
||
225 | public function neq($value) |
||
229 | |||
230 | /** |
||
231 | * @param SelectorInterface|mixed $value |
||
232 | * |
||
233 | * @return \Cubiche\Core\Specification\Constraint\Same |
||
234 | */ |
||
235 | public function same($value) |
||
239 | |||
240 | /** |
||
241 | * @param SelectorInterface|mixed $value |
||
242 | * |
||
243 | * @return \Cubiche\Core\Specification\Constraint\NotSame |
||
244 | */ |
||
245 | public function notSame($value) |
||
249 | |||
250 | /** |
||
251 | * @return \Cubiche\Core\Specification\Constraint\Same |
||
252 | */ |
||
253 | public function isNull() |
||
257 | |||
258 | /** |
||
259 | * @return \Cubiche\Core\Specification\Constraint\NotSame |
||
260 | */ |
||
261 | public function notNull() |
||
265 | |||
266 | /** |
||
267 | * @return \Cubiche\Core\Specification\Constraint\Same |
||
268 | */ |
||
269 | public function isTrue() |
||
273 | |||
274 | /** |
||
275 | * @return \Cubiche\Core\Specification\Constraint\Same |
||
276 | */ |
||
277 | public function isFalse() |
||
281 | |||
282 | /** |
||
283 | * @param SelectorInterface|mixed $value |
||
284 | * |
||
285 | * @return \Cubiche\Core\Specification\SelectorInterface |
||
286 | */ |
||
287 | protected function createSelector($value) |
||
291 | } |
||
292 |