@@ 1101-1114 (lines=14) @@ | ||
1098 | return []; |
|
1099 | } |
|
1100 | ||
1101 | protected function stringStringHandler($parent, $k, $v, $optionals, $fn) |
|
1102 | { |
|
1103 | if (! \is_string($k) || ! \is_string($v)) { |
|
1104 | return false; |
|
1105 | } |
|
1106 | ||
1107 | // The user has passed an element name and an element value: |
|
1108 | // [ 'element' => 'Element content' ] |
|
1109 | ||
1110 | $el = $this->createElement($k, $v); |
|
1111 | $el = \call_user_func($fn, $parent, $el); |
|
1112 | ||
1113 | return [ $el ]; |
|
1114 | } |
|
1115 | ||
1116 | protected function stringMixedHandler($parent, $k, $v, $optionals, $fn) |
|
1117 | { |
|
@@ 1156-1169 (lines=14) @@ | ||
1153 | return $context; |
|
1154 | } |
|
1155 | ||
1156 | protected function integerStringNotXmlHandler($parent, $k, $v, $optionals, $fn) |
|
1157 | { |
|
1158 | if (! \is_int($k) || ! \is_string($v) || is_an_xml_string($v)) { |
|
1159 | return false; |
|
1160 | } |
|
1161 | ||
1162 | // The user has passed a node name without a node value: |
|
1163 | // [ 'element', ... ] |
|
1164 | ||
1165 | $el = $this->createElement($v); |
|
1166 | $el = \call_user_func($fn, $parent, $el); |
|
1167 | ||
1168 | return [ $el ]; |
|
1169 | } |
|
1170 | ||
1171 | protected function integerXmlHandler($parent, $k, $v, $optionals, $fn) |
|
1172 | { |