| 1 | <?php |
||
| 11 | trait PatternTrait |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @Exclude |
||
| 15 | * @var string Defines the exact sequence of characters that are acceptable |
||
| 16 | */ |
||
| 17 | private $pattern = null; |
||
| 18 | |||
| 19 | protected function setPatternFacet($value) |
||
| 29 | |||
| 30 | private function checkRegexValidPattern($pattern) |
||
| 34 | |||
| 35 | |||
| 36 | private function checkPattern($v) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Checks a pattern against a string |
||
| 47 | * |
||
| 48 | * @param string $pattern the regex pattern |
||
| 49 | * @param string $string the string to check |
||
| 50 | * @return bool true if string matches pattern |
||
| 51 | */ |
||
| 52 | private function matchesRegexPattern($pattern, $string) |
||
| 57 | } |
||
| 58 |