1 | <?php |
||
7 | class DirectoryAndFilePresence extends Base |
||
8 | { |
||
9 | /** |
||
10 | * File exists constant. |
||
11 | */ |
||
12 | const FILE_EXISTS = 0; |
||
13 | |||
14 | /** |
||
15 | * File does not exists constant. |
||
16 | */ |
||
17 | const FILE_DOES_NOT_EXISTS = 1; |
||
18 | |||
19 | /** |
||
20 | * Directory exists constant. |
||
21 | */ |
||
22 | const DIRECTORY_EXISTS = 2; |
||
23 | |||
24 | /** |
||
25 | * Directory does not exists constant. |
||
26 | */ |
||
27 | const DIRECTORY_DOES_NOT_EXISTS = 3; |
||
28 | |||
29 | /** |
||
30 | * Checker. |
||
31 | * |
||
32 | * @return Result |
||
33 | */ |
||
34 | public function check() |
||
47 | |||
48 | /** |
||
49 | * Check file or dir presence. |
||
50 | * |
||
51 | * @return static |
||
52 | */ |
||
53 | protected function checkPresence() |
||
82 | |||
83 | public function getFiles() |
||
93 | |||
94 | /** |
||
95 | * Build file exists checker. |
||
96 | * |
||
97 | * @return \Closure |
||
98 | */ |
||
99 | public function buildFileExistsChecker() |
||
105 | |||
106 | /** |
||
107 | * Build file does not exists checker. |
||
108 | * |
||
109 | * @return \Closure |
||
110 | */ |
||
111 | public function buildFileDoesNotExistsChecker() |
||
117 | |||
118 | /** |
||
119 | * Build is directory checker. |
||
120 | * |
||
121 | * @return \Closure |
||
122 | */ |
||
123 | public function buildIsDirectoryChecker() |
||
129 | |||
130 | /** |
||
131 | * Get checkers. |
||
132 | * |
||
133 | * @return array |
||
134 | */ |
||
135 | public function getCheckers($checker) |
||
156 | |||
157 | /** |
||
158 | * Check if a file exists. |
||
159 | * |
||
160 | * @param $file |
||
161 | * @return bool|string |
||
162 | */ |
||
163 | public function fileExists($file) |
||
171 | |||
172 | /** |
||
173 | * Check if a file does not exists. |
||
174 | * |
||
175 | * @param $file |
||
176 | * @return bool|string |
||
177 | */ |
||
178 | public function fileDoesNotExists($file) |
||
186 | |||
187 | /** |
||
188 | * Check if a path is a directory. |
||
189 | * |
||
190 | * @param $file |
||
191 | * @return bool|string |
||
192 | */ |
||
193 | public function isDirectory($file) |
||
201 | } |
||
202 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.