| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function obtener(string $abstract) |
||
| 21 | { |
||
| 22 | if(interface_exists($abstract)) |
||
| 23 | { |
||
| 24 | $interface = explode('\\', $abstract); |
||
| 25 | $abstract = $this->_rutas[$interface[1]]; |
||
| 26 | } |
||
| 27 | |||
| 28 | if(isset($this->_bindings[$abstract])) |
||
| 29 | { |
||
| 30 | return $this->_bindings[$abstract]($this); |
||
| 31 | } |
||
| 32 | |||
| 33 | $reflection = new ReflectionClass($abstract); |
||
| 34 | |||
| 35 | $dependencies = $this->buildDependencies($reflection); |
||
| 36 | |||
| 37 | return $reflection->newInstanceArgs($dependencies); |
||
| 38 | } |
||
| 60 | } |