| 1 | <?php |
||
| 7 | class AlphaNumericSpecification implements SpecificationInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * {@inheritdoc} |
||
| 11 | */ |
||
| 12 | 11 | public function guard($value) |
|
| 13 | { |
||
| 14 | 11 | if (!$this->satisfiedBy($value)) { |
|
| 15 | 1 | throw new GuardException('Only alphanumeric values are accepted'); |
|
| 16 | } |
||
| 17 | 10 | } |
|
| 18 | |||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | */ |
||
| 22 | 11 | public function satisfiedBy($value) |
|
| 26 | } |
||
| 27 |