1 | <?php |
||
26 | trait ResourceFlagsTrait |
||
27 | { |
||
28 | /** |
||
29 | * Explodes the ?: flag into pieces |
||
30 | * |
||
31 | * @param string $resource The resource string |
||
32 | * |
||
33 | * @return array The parsed resources |
||
34 | */ |
||
35 | 80 | protected function explodeResourceIfElse($resource) |
|
46 | |||
47 | /** |
||
48 | * Returns the array pieces of the exploded ?: into a string |
||
49 | * |
||
50 | * @param array $resource The resource array |
||
51 | * |
||
52 | * @return string The parsed string resource |
||
53 | */ |
||
54 | 53 | protected function implodeResourceIfElse($resource) |
|
62 | |||
63 | /** |
||
64 | * Returns trimmed resource string |
||
65 | * |
||
66 | * @param string $resource The resource |
||
67 | * |
||
68 | * @return string The parsed string resource |
||
69 | */ |
||
70 | 80 | protected function trimFlags($resource) |
|
77 | |||
78 | /** |
||
79 | * Duplicates the flags from one string to another |
||
80 | * |
||
81 | * @param string $resource The resource to add the flags to |
||
82 | * @param string $resource The resource to duplicate the flags from |
||
83 | * |
||
84 | * @return string The parsed string resource |
||
85 | */ |
||
86 | 53 | protected function replicateFlags($resource, $original_resource) |
|
95 | |||
96 | /** |
||
97 | * Checks to see if the recursive flag is set |
||
98 | * |
||
99 | * @param string $resource The resource |
||
100 | * |
||
101 | * @return bool Is the recursive flag set |
||
102 | */ |
||
103 | 80 | private function checkRecursive($resource) |
|
107 | |||
108 | /** |
||
109 | * Checks to see if the file not found exception is suppressed |
||
110 | * |
||
111 | * @param string $resource The resource |
||
112 | * |
||
113 | * @return bool Is the exception suppressed |
||
114 | */ |
||
115 | 80 | private function checkSuppression($resource) |
|
119 | } |
||
120 |