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 apply($value) |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function select($selector) |
||
82 | |||
83 | /** |
||
84 | * @param string $key |
||
85 | * |
||
86 | * @return \Cubiche\Core\Specification\Selector |
||
87 | */ |
||
88 | public function key($key) |
||
92 | |||
93 | /** |
||
94 | * @param string $property |
||
95 | * |
||
96 | * @return \Cubiche\Core\Specification\Selector |
||
97 | */ |
||
98 | public function property($property) |
||
102 | |||
103 | /** |
||
104 | * @param string $method |
||
105 | * |
||
106 | * @return \Cubiche\Core\Specification\Selector |
||
107 | */ |
||
108 | public function method($method) |
||
112 | |||
113 | /** |
||
114 | * @param callable $callable |
||
115 | * |
||
116 | * @return \Cubiche\Core\Specification\Selector |
||
117 | */ |
||
118 | public function custom(callable $callable) |
||
122 | |||
123 | /** |
||
124 | * @return \Cubiche\Core\Specification\Selector |
||
125 | */ |
||
126 | public function count() |
||
130 | |||
131 | /** |
||
132 | * @param SpecificationInterface $specification |
||
133 | * |
||
134 | * @return \Cubiche\Core\Specification\Quantifier\All |
||
135 | */ |
||
136 | public function all(SpecificationInterface $specification) |
||
140 | |||
141 | /** |
||
142 | * @param int $count |
||
143 | * @param SpecificationInterface $specification |
||
144 | * |
||
145 | * @return \Cubiche\Core\Specification\Quantifier\AtLeast |
||
146 | */ |
||
147 | public function atLeast($count, SpecificationInterface $specification) |
||
151 | |||
152 | /** |
||
153 | * @param SpecificationInterface $specification |
||
154 | * |
||
155 | * @return \Cubiche\Core\Specification\Quantifier\AtLeast |
||
156 | */ |
||
157 | public function any(SpecificationInterface $specification) |
||
161 | |||
162 | /** |
||
163 | * @param SelectorInterface|mixed $value |
||
164 | * |
||
165 | * @return \Cubiche\Domain\Specification\Constraint\GreaterThan |
||
166 | */ |
||
167 | public function gt($value) |
||
171 | |||
172 | /** |
||
173 | * @param SelectorInterface|mixed $value |
||
174 | * |
||
175 | * @return \Cubiche\Core\Specification\Constraint\GreaterThanEqual |
||
176 | */ |
||
177 | public function gte($value) |
||
181 | |||
182 | /** |
||
183 | * @param SelectorInterface|mixed $value |
||
184 | * |
||
185 | * @return \Cubiche\Core\Specification\Constraint\LessThan |
||
186 | */ |
||
187 | public function lt($value) |
||
191 | |||
192 | /** |
||
193 | * @param SelectorInterface|mixed $value |
||
194 | * |
||
195 | * @return \Cubiche\Core\Specification\Constraint\LessThanEqual |
||
196 | */ |
||
197 | public function lte($value) |
||
201 | |||
202 | /** |
||
203 | * @param SelectorInterface|mixed $value |
||
204 | * |
||
205 | * @return \Cubiche\Core\Specification\Constraint\Equal |
||
206 | */ |
||
207 | public function eq($value) |
||
211 | |||
212 | /** |
||
213 | * @param SelectorInterface|mixed $value |
||
214 | * |
||
215 | * @return \Cubiche\Core\Specification\Constraint\NotEqual |
||
216 | */ |
||
217 | public function neq($value) |
||
221 | |||
222 | /** |
||
223 | * @param SelectorInterface|mixed $value |
||
224 | * |
||
225 | * @return \Cubiche\Core\Specification\Constraint\Same |
||
226 | */ |
||
227 | public function same($value) |
||
231 | |||
232 | /** |
||
233 | * @param SelectorInterface|mixed $value |
||
234 | * |
||
235 | * @return \Cubiche\Core\Specification\Constraint\NotSame |
||
236 | */ |
||
237 | public function notSame($value) |
||
241 | |||
242 | /** |
||
243 | * @return \Cubiche\Core\Specification\Constraint\Same |
||
244 | */ |
||
245 | public function isNull() |
||
249 | |||
250 | /** |
||
251 | * @return \Cubiche\Core\Specification\Constraint\NotSame |
||
252 | */ |
||
253 | public function notNull() |
||
257 | |||
258 | /** |
||
259 | * @return \Cubiche\Core\Specification\Constraint\Same |
||
260 | */ |
||
261 | public function isTrue() |
||
265 | |||
266 | /** |
||
267 | * @return \Cubiche\Core\Specification\Constraint\Same |
||
268 | */ |
||
269 | public function isFalse() |
||
273 | |||
274 | /** |
||
275 | * @param SelectorInterface|mixed $value |
||
276 | * |
||
277 | * @return \Cubiche\Core\Specification\SelectorInterface |
||
278 | */ |
||
279 | protected function createSelector($value) |
||
283 | } |
||
284 |