|
@@ 6612-6619 (lines=8) @@
|
| 6609 |
|
} |
| 6610 |
|
if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { |
| 6611 |
|
$this->debug("serialize attributes for XML Schema type $ns:$uqType"); |
| 6612 |
|
if (is_array($value)) { |
| 6613 |
|
$xvalue = $value; |
| 6614 |
|
} elseif (is_object($value)) { |
| 6615 |
|
$xvalue = get_object_vars($value); |
| 6616 |
|
} else { |
| 6617 |
|
$this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); |
| 6618 |
|
$xvalue = array(); |
| 6619 |
|
} |
| 6620 |
|
foreach ($typeDef['attrs'] as $aName => $attrs) { |
| 6621 |
|
if (isset($xvalue['!' . $aName])) { |
| 6622 |
|
$xname = '!' . $aName; |
|
@@ 6683-6690 (lines=8) @@
|
| 6680 |
|
} |
| 6681 |
|
if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { |
| 6682 |
|
$this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); |
| 6683 |
|
if (is_array($value)) { |
| 6684 |
|
$xvalue = $value; |
| 6685 |
|
} elseif (is_object($value)) { |
| 6686 |
|
$xvalue = get_object_vars($value); |
| 6687 |
|
} else { |
| 6688 |
|
$this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); |
| 6689 |
|
$xvalue = array(); |
| 6690 |
|
} |
| 6691 |
|
// toggle whether all elements are present - ideally should validate against schema |
| 6692 |
|
if (count($typeDef['elements']) != count($xvalue)) { |
| 6693 |
|
$optionals = true; |