Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function requireResource( |
||
18 | $type, |
||
19 | $action, |
||
20 | $format = 'html', |
||
21 | $base = null, |
||
22 | $position = Ajde_Document_Format_Html::RESOURCE_POSITION_DEFAULT, |
||
23 | $arguments = '' |
||
24 | ) { |
||
25 | if (!isset($base)) { |
||
26 | $base = $this->getParser()->getTemplate()->getBase(); |
||
27 | } |
||
28 | $resource = new Ajde_Resource_Local($type, $base, $action, $format, $arguments); |
||
29 | $this->getParser()->getDocument()->addResource($resource, $position); |
||
|
|||
30 | } |
||
31 | |||
52 |
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: