| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function add($line) |
||
| 40 | { |
||
| 41 | // split into parameter and path |
||
| 42 | $array = array_map('trim', mb_split('\s+', $line, 2)); |
||
| 43 | // strip any invalid characters from path prefix |
||
| 44 | $path = isset($array[1]) ? $this->urlEncode(mb_ereg_replace('[^A-Za-z0-9\.-\/\*\_]', '', $array[1])) : '/*'; |
||
| 45 | $param = array_map('trim', mb_split('&', $array[0])); |
||
| 46 | foreach ($param as $key) { |
||
| 47 | $this->array[$key][] = $path; |
||
| 48 | } |
||
| 49 | return true; |
||
| 50 | } |
||
| 51 | |||
| 86 |