1 | <?php |
||
3 | abstract class Ajde_Component extends Ajde_Object_Standard |
||
4 | { |
||
5 | const AC_XMLNS = 'ac'; |
||
6 | const AV_XMLNS = 'av'; |
||
7 | |||
8 | public $attributes = []; |
||
9 | public $innerXml = null; |
||
10 | |||
11 | protected $_parseRules = []; |
||
12 | |||
13 | /** |
||
14 | * @var Ajde_Template_Parser |
||
15 | */ |
||
16 | protected $_parser = null; |
||
17 | |||
18 | /** |
||
19 | * @param Ajde_Template_Parser $parser |
||
20 | * @param array $attributes |
||
21 | */ |
||
22 | public function __construct(Ajde_Template_Parser $parser, $attributes, $innerXml = null) |
||
29 | |||
30 | /** |
||
31 | * @return Ajde_Template_Parser |
||
32 | */ |
||
33 | public function getParser() |
||
37 | |||
38 | /** |
||
39 | * @param DOMNode $node |
||
40 | * |
||
41 | * @return Ajde_Component |
||
42 | */ |
||
43 | public static function fromNode(Ajde_Template_Parser $parser, DOMNode $node) |
||
56 | |||
57 | abstract public function process(); |
||
58 | |||
59 | protected function _init() |
||
63 | |||
64 | protected function _attributeParse() |
||
72 | } |
||
73 |
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: