|
@@ 6583-6590 (lines=8) @@
|
| 6580 |
|
} |
| 6581 |
|
if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { |
| 6582 |
|
$this->debug("serialize attributes for XML Schema type $ns:$uqType"); |
| 6583 |
|
if (is_array($value)) { |
| 6584 |
|
$xvalue = $value; |
| 6585 |
|
} elseif (is_object($value)) { |
| 6586 |
|
$xvalue = get_object_vars($value); |
| 6587 |
|
} else { |
| 6588 |
|
$this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); |
| 6589 |
|
$xvalue = array(); |
| 6590 |
|
} |
| 6591 |
|
foreach ($typeDef['attrs'] as $aName => $attrs) { |
| 6592 |
|
if (isset($xvalue['!' . $aName])) { |
| 6593 |
|
$xname = '!' . $aName; |
|
@@ 6654-6661 (lines=8) @@
|
| 6651 |
|
} |
| 6652 |
|
if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { |
| 6653 |
|
$this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); |
| 6654 |
|
if (is_array($value)) { |
| 6655 |
|
$xvalue = $value; |
| 6656 |
|
} elseif (is_object($value)) { |
| 6657 |
|
$xvalue = get_object_vars($value); |
| 6658 |
|
} else { |
| 6659 |
|
$this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); |
| 6660 |
|
$xvalue = array(); |
| 6661 |
|
} |
| 6662 |
|
// toggle whether all elements are present - ideally should validate against schema |
| 6663 |
|
if (count($typeDef['elements']) != count($xvalue)) { |
| 6664 |
|
$optionals = true; |