| 1 | <?php |
||
| 8 | final class RegularExpression implements Serializable |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $pattern; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param $regularExpression |
||
| 17 | * @return bool |
||
| 18 | */ |
||
| 19 | public static function isValidRegularExpression($regularExpression) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $pattern |
||
| 32 | */ |
||
| 33 | public function __construct($pattern) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param string |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | public function matches($string) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getPattern() |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param RegularExpression $other |
||
| 62 | * @return bool |
||
| 63 | */ |
||
| 64 | public function equals(RegularExpression $other) |
||
| 68 | |||
| 69 | public static function deserialize($data) |
||
| 73 | |||
| 74 | public function serialize() |
||
| 78 | |||
| 79 | public function __toString() |
||
| 83 | } |
||
| 84 |