/** * Will reduce an object * * @param EbatNs_SimpleType $element * @return integer Number of attributes remaining */ function _reduceElement($element) { if ($this->_options['NO_REDUCE']) { return true; } return $element->reduceElement($this->_options['NO_EMPTY_VALUES']); }
/** * @return */ function __construct() { parent::__construct('UserIDType', 'urn:ebay:apis:eBLBaseComponents'); }
/** * Do not use anymore * * @deprecated */ public function unsetMetaData($class = null) { if ($class === null) { $class = get_class($this); } parent::unsetMetaData(); unset($this->_elements[$class]); }
/** * @return */ function __construct() { parent::__construct('MyMessagesMessageIDType', 'urn:ebay:apis:eBLBaseComponents'); }
public function unsetMetaData() { parent::unsetMetaData(); unset($this->_elements); }
function serialize($elementName, $value, $attributeValues, $obmitNull, $typeName, &$dataConverter) { $ret = ''; // lets decide where we are getting the data from if ($this->_dataInValueArray) { $ret = ''; foreach ($value as $key => $data) { if (isset($data->attributeValues)) { $attributeValues = $data->attributeValues; } else { $attributeValues = null; } if (is_a($data, 'EbatNs_SimpleType')) { $ret .= $data->serialize($key, $data, $attributeValues, $obmitNull, null, $dataConverter); } else { $ret .= EbatNs_SimpleType::serialize($key, $data, $attributeValues, $obmitNull, null, $dataConverter); } } } else { if (count($this->_elements) == 0) { $ret = $this->value; } else { foreach ($this->_elements as $childElementName => $childTypeInfo) { $childValue = $this->{$childElementName}; if (isset($childTypeInfo['type'])) { $childType = $childTypeInfo['type']; } else { $childType = null; } if (is_array($childValue)) { $needArraySurrounding = null; foreach ($childValue as $arrayElementValue) { if (isset($arrayElementValue->attributeValues)) { $childAttributeValues = $arrayElementValue->attributeValues; } else { $childAttributeValues = null; } if (is_a($childValue, 'EbatNs_SimpleType')) { $ret .= $childValue->serialize($childElementName, $arrayElementValue, $childAttributeValues, $obmitNull, $childType, $dataConverter); } else { if (is_object($arrayElementValue)) { // hack to guess the original element name out of // the class-name of the array-element if (!$childTypeInfo['array']) { list($questedName) = split('type', get_class($arrayElementValue)); $questedName[0] = strtoupper($questedName[0]); /* $ret .= '<' . $childElementName . '>' . $arrayElementValue->serialize( $questedName, $arrayElementValue, $childAttributeValues, $obmitNull, $childType, $dataConverter ) . '</' . $childElementName . '>'; */ $needArraySurrounding = $childElementName; $ret .= $arrayElementValue->serialize($questedName, $arrayElementValue, $childAttributeValues, $obmitNull, $childType, $dataConverter); } else { $ret .= $arrayElementValue->serialize($childElementName, $arrayElementValue, $childAttributeValues, $obmitNull, $childType, $dataConverter); } } else { $ret .= EbatNs_SimpleType::serialize($childElementName, $arrayElementValue, $childAttributeValues, $obmitNull, $childType, $dataConverter); } } } if ($needArraySurrounding !== null) { $ret = '<' . $needArraySurrounding . '>' . $ret . '</' . $needArraySurrounding . '>'; } } else { if (isset($childValue->attributeValues)) { $childAttributeValues = $childValue->attributeValues; } else { $childAttributeValues = null; } if (is_a($childValue, 'EbatNs_SimpleType')) { $ret .= $childValue->serialize($childElementName, $childValue, $childAttributeValues, $obmitNull, $childType, $dataConverter); } else { $ret .= EbatNs_SimpleType::serialize($childElementName, $childValue, $childAttributeValues, $obmitNull, $childType, $dataConverter); } } // plain } } } $ret = '<' . $elementName . $this->_getAttributeString($attributeValues) . '>' . $ret . '</' . $elementName . '>'; return $ret; }
function __construct($name, $nsURI) { parent::__construct($name, $nsURI); }