| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function cascadeNamespace($class_name) |
||
| 15 | { |
||
| 16 | if ($this->isResolved($class_name)) { |
||
| 17 | return $this->resolved($class_name); |
||
| 18 | } |
||
| 19 | |||
| 20 | // not fully namespaced, lets cascade |
||
| 21 | foreach ($this->namespace_cascade as $ns) { |
||
| 22 | if (class_exists($fully_namespaced = $ns . $class_name)) { |
||
| 23 | $this->resolved($class_name, $fully_namespaced); |
||
| 24 | return $fully_namespaced; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | throw new NotFoundException($class_name); |
||
| 28 | } |
||
| 45 |