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