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 | 26 | public function setString($string = '') |
|
45 | |||
46 | /** |
||
47 | * Gets the string. |
||
48 | * |
||
49 | * @return string the string |
||
50 | */ |
||
51 | 26 | 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 | 19 | public function isValidRegex() |
|
87 | |||
88 | /** |
||
89 | * Confirms if a valid regex string contains a key and a value named suppattern. |
||
90 | * |
||
91 | * A simple directive matcher MUST contain a key and a value named subpattern. |
||
92 | * A starting block directive matcher MUST contain a key and a value named subpattern. |
||
93 | * |
||
94 | * @return bool true if the string is valid, false otherwise |
||
95 | */ |
||
96 | 17 | public function hasKeyAndValueSubPattern() |
|
108 | } |
||
109 |