1 | <?php |
||
23 | class Checker |
||
24 | { |
||
25 | /** @var string a string to check */ |
||
26 | private $string = ''; |
||
27 | |||
28 | /** |
||
29 | * Sets an empty string if the parameter has the wrong type. |
||
30 | * |
||
31 | * @param string $string a string to check |
||
32 | */ |
||
33 | 28 | public function setString($string = '') |
|
45 | |||
46 | /** |
||
47 | * Gets the string. |
||
48 | * |
||
49 | * @return string the string |
||
50 | */ |
||
51 | 28 | public function getString() |
|
55 | |||
56 | /** |
||
57 | * Confirms if a string is an existing absolute path. |
||
58 | * |
||
59 | * @return bool true if the string is an existing absolute path, false otherwise |
||
60 | */ |
||
61 | 10 | public function isValidAbsolutePath() |
|
73 | |||
74 | /** |
||
75 | * Confirms if a string is a valid regular expression. |
||
76 | * |
||
77 | * @return bool true if the string is a valid regex, false otherwise |
||
78 | */ |
||
79 | public function isValidRegex() |
||
97 | |||
98 | /** |
||
99 | * Confirms if a valid regex string contains a key and a value named suppattern. |
||
100 | * |
||
101 | * A simple directive matcher MUST contain a key and a value named subpattern. |
||
102 | * A starting block directive matcher MUST contain a key and a value named subpattern. |
||
103 | * |
||
104 | * @return bool true if the string is valid, false otherwise |
||
105 | */ |
||
106 | 17 | public function hasKeyAndValueSubPattern() |
|
118 | } |
||
119 |