1 | <?php |
||
19 | final class EqualPredicate implements Predicate |
||
20 | { |
||
21 | protected $value; |
||
22 | |||
23 | /** |
||
24 | * EqualPredicate constructor. |
||
25 | * |
||
26 | * @param mixed $value The value to compare to. |
||
27 | */ |
||
28 | 14 | public function __construct($value) |
|
32 | |||
33 | /** |
||
34 | * Gets the value. |
||
35 | * |
||
36 | * @return mixed The value. |
||
37 | */ |
||
38 | 1 | public function getValue() |
|
39 | { |
||
40 | 1 | return $this->value; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * Evaluates the predicate returning true if the input equals the stored value. |
||
45 | * |
||
46 | * @param mixed $value The input value |
||
47 | * @return bool true if input value equals stored value. |
||
48 | */ |
||
49 | 13 | public function __invoke($value) : bool |
|
53 | } |
||
54 |