|
@@ 1308-1317 (lines=10) @@
|
| 1305 |
|
return []; |
| 1306 |
|
} |
| 1307 |
|
|
| 1308 |
|
protected function insertStringString($parent, $k, $v, $fn) |
| 1309 |
|
{ |
| 1310 |
|
// The user has passed an element name and an element value: |
| 1311 |
|
// [ 'element' => 'Element content' ] |
| 1312 |
|
|
| 1313 |
|
$el = $this->createElement($k, $v); |
| 1314 |
|
$el = $fn($parent, $el); |
| 1315 |
|
|
| 1316 |
|
return [ $el ]; |
| 1317 |
|
} |
| 1318 |
|
|
| 1319 |
|
protected function insertStringMixed($parent, $k, $v, $fn, &$optionals) |
| 1320 |
|
{ |
|
@@ 1319-1333 (lines=15) @@
|
| 1316 |
|
return [ $el ]; |
| 1317 |
|
} |
| 1318 |
|
|
| 1319 |
|
protected function insertStringMixed($parent, $k, $v, $fn, &$optionals) |
| 1320 |
|
{ |
| 1321 |
|
// The user has passed one of these two cases: |
| 1322 |
|
// - [ 'element' => [...] ] |
| 1323 |
|
// - [ 'element' => DOMNode|SimpleXMLElement|FluidXml ] |
| 1324 |
|
|
| 1325 |
|
$el = $this->createElement($k); |
| 1326 |
|
$el = $fn($parent, $el); |
| 1327 |
|
|
| 1328 |
|
// The new children elements must be created in the order |
| 1329 |
|
// they are supplied, so 'appendChild' is the perfect operation. |
| 1330 |
|
$this->newContext($el)->appendChild($v, ...$optionals); |
| 1331 |
|
|
| 1332 |
|
return [ $el ]; |
| 1333 |
|
} |
| 1334 |
|
|
| 1335 |
|
protected function insertIntegerArray($parent, $k, $v, $fn, &$optionals) |
| 1336 |
|
{ |