1 | <?php |
||
7 | class XmlWriter implements WriterInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var \SplFileObject |
||
11 | */ |
||
12 | protected $file; |
||
13 | |||
14 | /** |
||
15 | * @var BaseXmlWriter |
||
16 | */ |
||
17 | protected $writer; |
||
18 | |||
19 | /** |
||
20 | * @var bool |
||
21 | */ |
||
22 | protected $indent = false; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $rootNode = 'feed'; |
||
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | 14 | public function __construct(\SplFileObject $file = null) |
|
36 | |||
37 | /** |
||
38 | * The clone magic method. |
||
39 | */ |
||
40 | public function __clone() |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function setFile(\SplFileObject $file) |
||
53 | |||
54 | /** |
||
55 | * @param bool $ident |
||
56 | */ |
||
57 | public function setIndent($ident) |
||
61 | |||
62 | /** |
||
63 | * @param string $node |
||
64 | */ |
||
65 | 2 | public function setRootNode($node) |
|
69 | |||
70 | /** |
||
71 | * @inheritdoc |
||
72 | */ |
||
73 | 8 | public function start() |
|
89 | |||
90 | /** |
||
91 | * @inheritdoc |
||
92 | */ |
||
93 | 8 | public function write($data) |
|
101 | |||
102 | /** |
||
103 | * @inheritdoc |
||
104 | */ |
||
105 | 6 | public function flush() |
|
113 | |||
114 | /** |
||
115 | * @inheritdoc |
||
116 | */ |
||
117 | 6 | public function end() |
|
129 | } |
||
130 |