Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
22 | public function addAlias($alias, $class) |
||
23 | { |
||
24 | $handler = $this->getHandler($class); |
||
25 | |||
26 | if(null === $handler) { |
||
27 | throw new \RuntimeException(sprintf('Handler for class %s does not exist!', $class)); |
||
28 | } |
||
29 | |||
30 | $this->handlers[$alias] = $handler; |
||
31 | $this->aliases[$alias] = $this->aliases[$class]; |
||
32 | } |
||
33 | |||
44 |