1 | <?php |
||
13 | abstract class XMLBuild |
||
14 | { |
||
15 | /** |
||
16 | * indentLines() |
||
17 | * |
||
18 | * this will add a line-separator at the end of the last line because if it was |
||
19 | * empty it is not any longer and deserves one. |
||
20 | * |
||
21 | * @param string $lines |
||
22 | * @param string $indent (optional) |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | public static function indentLines($lines, $indent = ' ') |
||
41 | |||
42 | /** |
||
43 | * @param string $name |
||
44 | * @param array|Traversable $attributes attributeName => attributeValue string pairs |
||
45 | * @param bool $emptyTag create an empty element tag (commonly known as short tags) |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | 1 | public static function startTag($name, $attributes, $emptyTag = false) |
|
57 | |||
58 | /** |
||
59 | * @param array|Traversable $attributes attributeName => attributeValue string pairs |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | 1 | public static function attributes($attributes) |
|
72 | |||
73 | /** |
||
74 | * @param string $value |
||
75 | * |
||
76 | * @see XMLBuild::numericEntitiesSingleByte |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | 1 | public static function attributeValue($value) |
|
89 | |||
90 | /** |
||
91 | * @param string $name |
||
92 | * @param array|Traversable $attributes attributeName => attributeValue string pairs |
||
93 | * @param string $innerXML |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | 1 | public static function wrapTag($name, $attributes, $innerXML) |
|
109 | |||
110 | /** |
||
111 | * @param XMLReader $reader |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | public static function readerNode(XMLReader $reader) |
||
130 | |||
131 | /** |
||
132 | * @param array $matches |
||
133 | * |
||
134 | * @return string |
||
135 | * @see attributeValue() |
||
136 | */ |
||
137 | 1 | private static function numericEntitiesSingleByte($matches) |
|
147 | } |
||
148 |