1 | <?php |
||
15 | class Twital |
||
16 | { |
||
17 | const NS = 'urn:goetas:twital'; |
||
18 | |||
19 | protected $extensionsInitialized = false; |
||
20 | |||
21 | /** |
||
22 | * |
||
23 | * @var EventDispatcher |
||
24 | */ |
||
25 | protected $dispatcher; |
||
26 | |||
27 | /** |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | private $attributes = array(); |
||
32 | |||
33 | /** |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | private $nodes = array(); |
||
38 | |||
39 | /** |
||
40 | * |
||
41 | * @var array |
||
42 | */ |
||
43 | private $extensions = array(); |
||
44 | |||
45 | 490 | public function __construct(array $options = array()) |
|
52 | |||
53 | /** |
||
54 | * |
||
55 | * @return \Symfony\Component\EventDispatcher\EventDispatcher |
||
56 | */ |
||
57 | 23 | public function getEventDispatcher() |
|
63 | |||
64 | 480 | public function getNodes() |
|
70 | |||
71 | 447 | public function getAttributes() |
|
77 | |||
78 | /** |
||
79 | * |
||
80 | * @param SourceAdapter $adapter |
||
81 | * @param string $source |
||
82 | * @return string |
||
83 | */ |
||
84 | 483 | public function compile(SourceAdapter $adapter, $source) |
|
107 | |||
108 | 488 | public function addExtension(Extension $extension) |
|
114 | |||
115 | public function setExtensions(array $extensions) |
||
121 | |||
122 | /** |
||
123 | * @return Extension[] |
||
124 | */ |
||
125 | 484 | public function getExtensions() |
|
129 | |||
130 | 484 | protected function initExtensions() |
|
144 | } |
||
145 |