Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function process() |
||
20 | { |
||
21 | switch ($this->_attributeParse()) { |
||
22 | case 'html': |
||
23 | $qr = new Ajde_Resource_Qrcode($this->attributes['text']); |
||
24 | |||
25 | $controller = Ajde_Controller::fromRoute(new Ajde_Core_Route('_core/component:qrcode')); |
||
26 | $controller->setQrcode($qr); |
||
|
|||
27 | |||
28 | return $controller->invoke(); |
||
29 | break; |
||
30 | } |
||
31 | // TODO: |
||
32 | throw new Ajde_Component_Exception('Missing required attributes for component call'); |
||
33 | } |
||
34 | } |
||
35 |
If you implement
__call
and 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
__call
is implemented by a parent class and only the child class knows which methods exist: