Renamed _exportOptions method
This commit is contained in:
parent
e403bf207c
commit
49587776fa
@ -911,7 +911,7 @@ public function __construct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($metadata->table['options']) && $metadata->table['options']) {
|
if (isset($metadata->table['options']) && $metadata->table['options']) {
|
||||||
$table[] = 'options={' . $this->_exportOptions((array) $metadata->table['options']) . '}';
|
$table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
|
if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
|
||||||
@ -1566,13 +1566,13 @@ public function __construct()
|
|||||||
*
|
*
|
||||||
* @param array $options
|
* @param array $options
|
||||||
*/
|
*/
|
||||||
private function _exportOptions(array $options)
|
private function exportTableOptions(array $options)
|
||||||
{
|
{
|
||||||
$optionsStr = array();
|
$optionsStr = array();
|
||||||
|
|
||||||
foreach($options as $name => $option) {
|
foreach($options as $name => $option) {
|
||||||
if (is_array($option)) {
|
if (is_array($option)) {
|
||||||
$optionsStr[] = '"' . $name . '"={' . $this->_exportOptions($option) . '}';
|
$optionsStr[] = '"' . $name . '"={' . $this->exportTableOptions($option) . '}';
|
||||||
} else {
|
} else {
|
||||||
$optionsStr[] = '"' . $name . '"="' . (string) $option . '"';
|
$optionsStr[] = '"' . $name . '"="' . (string) $option . '"';
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ class XmlExporter extends AbstractExporter
|
|||||||
if (isset($metadata->table['options'])) {
|
if (isset($metadata->table['options'])) {
|
||||||
$optionsXml = $root->addChild('options');
|
$optionsXml = $root->addChild('options');
|
||||||
|
|
||||||
$this->_exportOptions($optionsXml, $metadata->table['options']);
|
$this->exportTableOptions($optionsXml, $metadata->table['options']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($metadata->discriminatorColumn) {
|
if ($metadata->discriminatorColumn) {
|
||||||
@ -391,14 +391,14 @@ class XmlExporter extends AbstractExporter
|
|||||||
* @param \SimpleXMLElement $parentXml
|
* @param \SimpleXMLElement $parentXml
|
||||||
* @param array $options
|
* @param array $options
|
||||||
*/
|
*/
|
||||||
private function _exportOptions(\SimpleXMLElement $parentXml, array $options)
|
private function exportTableOptions(\SimpleXMLElement $parentXml, array $options)
|
||||||
{
|
{
|
||||||
foreach ($options as $name => $option) {
|
foreach ($options as $name => $option) {
|
||||||
$optionXml = $parentXml->addChild('option');
|
$optionXml = $parentXml->addChild('option');
|
||||||
$optionXml->addAttribute('name', (string) $name);
|
$optionXml->addAttribute('name', (string) $name);
|
||||||
|
|
||||||
if (is_array($option)) {
|
if (is_array($option)) {
|
||||||
$this->_exportOptions($optionXml, $option);
|
$this->exportTableOptions($optionXml, $option);
|
||||||
} else {
|
} else {
|
||||||
$optionXml[0] = (string) $option;
|
$optionXml[0] = (string) $option;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user