| 1 | <?php |
||
| 9 | class Regex implements DataTypeInterface |
||
| 10 | { |
||
| 11 | use DataTypeRegexTrait; |
||
| 12 | |||
| 13 | const DATA_FORMAT_ERROR = 'Assertion failed for value "%s" for "%s" : INVALID_FORMAT'; |
||
| 14 | |||
| 15 | protected $regex; |
||
| 16 | protected $sanitizeFlags; |
||
| 17 | protected static $defaults = [ |
||
| 18 | 'default' => null, |
||
| 19 | 'regex' => null, |
||
| 20 | 'sanitize_flag' => null |
||
| 21 | ]; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Regex constructor. |
||
| 25 | * @param string $key |
||
| 26 | * @param mixed $datum |
||
| 27 | * @param array $options |
||
| 28 | * @throws InvalidArgumentException |
||
| 29 | */ |
||
| 30 | public function __construct(string $key, $datum, array $options = []) |
||
| 42 | } |
||
| 43 |