1 | <?php |
||
6 | class Render implements OPMLInterface |
||
7 | { |
||
8 | /** |
||
9 | * Version to use for the build |
||
10 | * 2.0 - `text` attribute is required |
||
11 | * 1.0 - for legacy support |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $version; |
||
15 | |||
16 | /** |
||
17 | * Rendered XML object |
||
18 | * @var SimpleXMLElement |
||
19 | */ |
||
20 | protected $object; |
||
21 | |||
22 | /** |
||
23 | * Constructor |
||
24 | * |
||
25 | * @param array $array is the array we want to render and must follow structure defined above |
||
26 | * @param string $encoding character encoding to use |
||
27 | * @param string $version '2.0' if `text` attribute is required, '1.0' for legacy |
||
28 | * @throws Exceptions\RenderException |
||
29 | */ |
||
30 | public function __construct($array, $encoding = self::ENCODING, $version = self::VERSION_DEFAULT) |
||
58 | |||
59 | /** |
||
60 | * Create a XML outline object in a parent object. |
||
61 | * |
||
62 | * @param SimpleXMLElement $parent is the parent object of current outline |
||
63 | * @param array $outline array representing an outline object |
||
64 | * @return void |
||
65 | * @throws Exceptions\RenderException |
||
66 | */ |
||
67 | protected function renderOutline($parent, $outline) |
||
92 | |||
93 | /** |
||
94 | * Return as a XML object |
||
95 | * |
||
96 | * @return SimpleXMLElement |
||
97 | */ |
||
98 | public function asXMLObject() |
||
102 | } |
||
103 |