1 | <?php |
||
22 | class Regex |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * The Regex library we're using |
||
27 | * |
||
28 | * @var \RegexGuard\RegexGuard |
||
29 | */ |
||
30 | private $instance = null; |
||
31 | |||
32 | /** |
||
33 | * Returns an instance of the library |
||
34 | * |
||
35 | * @return \RegexGuard\RegexGuard |
||
36 | */ |
||
37 | private function getInstance() |
||
45 | |||
46 | /** |
||
47 | * Validates a given regular expression |
||
48 | * |
||
49 | * @param string $regexp |
||
50 | * The regular expression to validate |
||
51 | * @return boolean |
||
52 | */ |
||
53 | public function validate($regexp) |
||
57 | |||
58 | /** |
||
59 | * Matches a regular expression |
||
60 | * |
||
61 | * @param string $pattern |
||
62 | * The regular expression to execute |
||
63 | * @param string $subject |
||
64 | * The string to search within |
||
65 | * @return boolean |
||
66 | */ |
||
67 | public function match($pattern, $subject) |
||
75 | } |