Updated XML Exporter to deal with some HHVM weirdness.
This commit is contained in:
parent
10a0daf620
commit
9441e063aa
@ -269,7 +269,7 @@ class XmlExporter extends AbstractExporter
|
|||||||
if (isset($associationMapping['fetch'])) {
|
if (isset($associationMapping['fetch'])) {
|
||||||
$associationMappingXml->addAttribute('fetch', $this->_getFetchModeString($associationMapping['fetch']));
|
$associationMappingXml->addAttribute('fetch', $this->_getFetchModeString($associationMapping['fetch']));
|
||||||
}
|
}
|
||||||
|
|
||||||
$cascade = array();
|
$cascade = array();
|
||||||
if ($associationMapping['isCascadeRemove']) {
|
if ($associationMapping['isCascadeRemove']) {
|
||||||
$cascade[] = 'cascade-remove';
|
$cascade[] = 'cascade-remove';
|
||||||
@ -396,15 +396,16 @@ class XmlExporter extends AbstractExporter
|
|||||||
* @param array $options
|
* @param array $options
|
||||||
*/
|
*/
|
||||||
private function exportTableOptions(\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 = is_array($option)
|
||||||
|
? $parentXml->addChild('option')
|
||||||
|
: $parentXml->addChild('option', (string) $option);
|
||||||
|
|
||||||
$optionXml->addAttribute('name', (string) $name);
|
$optionXml->addAttribute('name', (string) $name);
|
||||||
|
|
||||||
if (is_array($option)) {
|
if (is_array($option)) {
|
||||||
$this->exportTableOptions($optionXml, $option);
|
$this->exportTableOptions($optionXml, $option);
|
||||||
} else {
|
|
||||||
$optionXml[0] = (string) $option;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user