|
@@ 6305-6312 (lines=8) @@
|
| 6302 |
|
} |
| 6303 |
|
if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { |
| 6304 |
|
$this->debug("serialize attributes for XML Schema type $ns:$uqType"); |
| 6305 |
|
if (is_array($value)) { |
| 6306 |
|
$xvalue = $value; |
| 6307 |
|
} elseif (is_object($value)) { |
| 6308 |
|
$xvalue = get_object_vars($value); |
| 6309 |
|
} else { |
| 6310 |
|
$this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); |
| 6311 |
|
$xvalue = array(); |
| 6312 |
|
} |
| 6313 |
|
foreach ($typeDef['attrs'] as $aName => $attrs) { |
| 6314 |
|
if (isset($xvalue['!' . $aName])) { |
| 6315 |
|
$xname = '!' . $aName; |
|
@@ 6369-6376 (lines=8) @@
|
| 6366 |
|
} |
| 6367 |
|
if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { |
| 6368 |
|
$this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); |
| 6369 |
|
if (is_array($value)) { |
| 6370 |
|
$xvalue = $value; |
| 6371 |
|
} elseif (is_object($value)) { |
| 6372 |
|
$xvalue = get_object_vars($value); |
| 6373 |
|
} else { |
| 6374 |
|
$this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); |
| 6375 |
|
$xvalue = array(); |
| 6376 |
|
} |
| 6377 |
|
// toggle whether all elements are present - ideally should validate against schema |
| 6378 |
|
if (count($typeDef['elements']) != count($xvalue)) { |
| 6379 |
|
$optionals = true; |