Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function get($id) |
||
37 | { |
||
38 | if ($this->has($id)) { |
||
39 | try { |
||
40 | return $this->container->make($id); |
||
41 | } catch (\Exception $prev) { |
||
42 | throw new ContainerException(sprintf("An exception occurred trying to resolve %s, see previous", $id), 0, $prev); |
||
43 | } |
||
44 | } else { |
||
45 | throw new NotFoundException(sprintf('There is no entry found in the container for %s and it is not an instantiable class', $id)); |
||
46 | } |
||
47 | } |
||
48 | |||
53 | } |