1 | <?php |
||
14 | class Twital |
||
15 | { |
||
16 | const NS = 'urn:goetas:twital'; |
||
17 | |||
18 | protected $extensionsInitialized = false; |
||
19 | |||
20 | /** |
||
21 | * |
||
22 | * @var EventDispatcher |
||
23 | */ |
||
24 | protected $dispatcher; |
||
25 | |||
26 | /** |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | private $attributes = array(); |
||
31 | |||
32 | /** |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | private $nodes = array(); |
||
37 | |||
38 | /** |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | private $extensions = array(); |
||
43 | |||
44 | 468 | public function __construct(array $options = array()) |
|
51 | |||
52 | /** |
||
53 | * |
||
54 | * @return \Symfony\Component\EventDispatcher\EventDispatcher |
||
55 | */ |
||
56 | 22 | public function getEventDispatcher() |
|
62 | |||
63 | 461 | public function getNodes() |
|
69 | |||
70 | 428 | public function getAttributes() |
|
71 | 1 | { |
|
72 | 428 | $this->initExtensions(); |
|
73 | |||
74 | 428 | return $this->attributes; |
|
75 | } |
||
76 | |||
77 | 462 | protected function initExtensions() |
|
91 | |||
92 | /** |
||
93 | * |
||
94 | * @param SourceAdapter $adapter |
||
95 | * @param string $source |
||
96 | * @return string |
||
97 | */ |
||
98 | 461 | public function compile(SourceAdapter $adapter, $source) |
|
121 | |||
122 | 466 | public function addExtension(Extension $extension) |
|
128 | |||
129 | public function setExtensions(array $extensions) |
||
135 | |||
136 | /** |
||
137 | * @return Extension[] |
||
138 | */ |
||
139 | 462 | public function getExtensions() |
|
143 | } |
||
144 |