| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public static function fromController(Ajde_Controller $controller) |
||
| 11 | { |
||
| 12 | $base = MODULE_DIR.$controller->getModule().'/'; |
||
| 13 | $action = $controller->getRoute()->getController() ? |
||
| 14 | $controller->getRoute()->getController().'/'.$controller->getAction() : |
||
| 15 | $controller->getAction(); |
||
| 16 | $format = $controller->hasFormat() ? $controller->getFormat() : 'html'; |
||
|
|
|||
| 17 | |||
| 18 | return new self($base, $action, $format); |
||
| 19 | } |
||
| 20 | |||
| 40 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: