| 1 | <?php |
||
| 10 | class Regexp implements ExpressionInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string Internal regular expression |
||
| 14 | */ |
||
| 15 | private $regexp; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Set regular expression |
||
| 19 | * |
||
| 20 | * @param string $regexp |
||
| 21 | */ |
||
| 22 | public function __construct(string $regexp) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Check if $operand matches regular expression |
||
| 29 | */ |
||
| 30 | public function evaluate($operand): bool |
||
| 34 | } |
||
| 35 |