|
@@ 567-573 (lines=7) @@
|
| 564 |
|
* @param array &$arr |
| 565 |
|
* @param array|string|int $names The element name(s) to be output as subelements |
| 566 |
|
*/ |
| 567 |
|
public static function setSubelementsList( array &$arr, $names ) { |
| 568 |
|
if ( !isset( $arr[self::META_SUBELEMENTS] ) ) { |
| 569 |
|
$arr[self::META_SUBELEMENTS] = (array)$names; |
| 570 |
|
} else { |
| 571 |
|
$arr[self::META_SUBELEMENTS] = array_merge( $arr[self::META_SUBELEMENTS], (array)$names ); |
| 572 |
|
} |
| 573 |
|
} |
| 574 |
|
|
| 575 |
|
/** |
| 576 |
|
* Causes the elements with the specified names to be output as |
|
@@ 677-683 (lines=7) @@
|
| 674 |
|
* @param array &$arr |
| 675 |
|
* @param array|string $names The element name(s) to preserve |
| 676 |
|
*/ |
| 677 |
|
public static function setPreserveKeysList( array &$arr, $names ) { |
| 678 |
|
if ( !isset( $arr[self::META_PRESERVE_KEYS] ) ) { |
| 679 |
|
$arr[self::META_PRESERVE_KEYS] = (array)$names; |
| 680 |
|
} else { |
| 681 |
|
$arr[self::META_PRESERVE_KEYS] = array_merge( $arr[self::META_PRESERVE_KEYS], (array)$names ); |
| 682 |
|
} |
| 683 |
|
} |
| 684 |
|
|
| 685 |
|
/** |
| 686 |
|
* Preserve specified keys. |