Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function __call($method, $arguments) |
||
26 | { |
||
27 | if (array_key_exists($method, $validResources = $this::getValidResources())) { |
||
28 | $className = $validResources[$method]; |
||
29 | $instance = new $className($this); |
||
30 | } else { |
||
31 | throw new \BadMethodCallException("No method called $method available in " . __CLASS__); |
||
32 | } |
||
33 | |||
34 | return $instance->$method(...$arguments); |
||
35 | } |
||
37 |