| 1 | <?php |
||
| 7 | class EqualRule extends AbstractAtomicRule |
||
| 8 | { |
||
| 9 | /** @var string operator */ |
||
| 10 | const operator = '='; |
||
| 11 | |||
| 12 | /** @var mixed $value */ |
||
| 13 | protected $value; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param string $field The field to apply the rule on. |
||
| 17 | * @param array $value The value the field can equal to. |
||
| 18 | */ |
||
| 19 | 185 | public function __construct( $field, $value ) |
|
| 24 | |||
| 25 | /** |
||
| 26 | */ |
||
| 27 | 169 | public function getValue() |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @return array |
||
| 34 | */ |
||
| 35 | 165 | public function getValues() |
|
| 39 | |||
| 40 | /** |
||
| 41 | * By default, every atomic rule can have a solution by itself |
||
| 42 | * |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | 53 | public function hasSolution(array $contextual_options=[]) |
|
| 49 | |||
| 50 | /**/ |
||
| 51 | } |
||
| 52 |