| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public function search($pattern, $recursive=true){ |
||
| 49 | $results = []; |
||
| 50 | $rx_pattern = '('.strtr($pattern,['.'=>'\.','*'=>'.*','?'=>'.']).')Ai'; |
||
| 51 | foreach (array_keys($this->storage) as $path) { |
||
| 52 | if (preg_match($rx_pattern,$path)) $results[] = $path; |
||
| 53 | } |
||
| 54 | return $results; |
||
| 55 | } |
||
| 56 | } |
||
| 57 |