1 | <?php |
||
21 | trait MonitorTrait |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Return path with trailing slash. |
||
26 | * |
||
27 | * @param string $path |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | public function dirPath($path) |
||
35 | |||
36 | /** |
||
37 | * Directories have trailing slash/ |
||
38 | * |
||
39 | * @param string $path |
||
40 | * |
||
41 | * @return bool |
||
42 | */ |
||
43 | public function hasTrailingSlash($path) |
||
47 | |||
48 | /** |
||
49 | * Fix a Linux path (normalize). |
||
50 | * - replace consecutive '/' with one |
||
51 | * - replace '/./' with '/' |
||
52 | * - replace '/../' at the begining with '/' |
||
53 | * - remove backward pathes '??/../' |
||
54 | * |
||
55 | * @param string $path |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | public function fixPathSlashes($path) |
||
75 | } |
||
76 |