Definition at line 8 of file Generator.php.
◆ __construct()
Definition at line 33 of file Generator.php.
35 $this->_dom = new \DOMDocument(
'1.0');
36 $this->_dom->formatOutput =
true;
◆ __toString()
◆ _getCurrentDom()
◆ _getIndexedArrayItemName()
_getIndexedArrayItemName |
( |
| ) |
|
|
protected |
Get xml node name to use instead of numeric index during numeric arrays conversion.
- Returns
- string
Definition at line 147 of file Generator.php.
const DEFAULT_ENTITY_ITEM_NAME
◆ _setCurrentDom()
- Parameters
-
- Returns
- $this
Definition at line 61 of file Generator.php.
63 $this->_currentDom = $node;
◆ arrayToXml()
- Parameters
-
- Returns
- $this
- Exceptions
-
Definition at line 73 of file Generator.php.
80 $node = $this->
getDom()->createElement(preg_replace(
'/[^\w-]/i',
'', $_key));
81 $parentNode->appendChild($node);
83 if (is_array(
$_item[
'_value'])) {
84 if (isset(
$_item[
'_value'][0])) {
85 foreach (
$_item[
'_value'] as $_v) {
92 $child = $this->
getDom()->createTextNode(
$_item[
'_value']);
93 $node->appendChild($child);
95 foreach (
$_item[
'_attribute'] as $_attributeKey => $_attributeValue) {
96 $node->setAttribute($_attributeKey, $_attributeValue);
100 $node->appendChild(
$text);
elseif(isset( $params[ 'redirect_parent']))
_getIndexedArrayItemName()
◆ getDom()
◆ save()
◆ setIndexedArrayItemName()
setIndexedArrayItemName |
( |
|
$name | ) |
|
Set xml node name to use instead of numeric index during numeric arrays conversion.
- Parameters
-
- Returns
- $this
Definition at line 136 of file Generator.php.
138 $this->_defaultIndexedArrayItemName =
$name;
if(!isset($_GET['name'])) $name
◆ $_currentDom
◆ $_defaultIndexedArrayItemName
$_defaultIndexedArrayItemName |
|
protected |
◆ $_dom
◆ DEFAULT_ENTITY_ITEM_NAME
const DEFAULT_ENTITY_ITEM_NAME = 'item' |
This value is used to replace numeric keys while formatting data for xml output.
Definition at line 13 of file Generator.php.
The documentation for this class was generated from the following file: