private function endElement($parser, $name)
    {
        $meta = $this->metaStack->pop();

        if (!$this->metaStack->isEmpty()) {
            // Element in the XML may not exist as a property name in the class.
            // This could happen if the SDK is out of date with what eBay return.
            // It could also happen if eBay return elements that are not mentioned in any WSDL.
            if ($meta->propertyName !== '') {
                $parentObject = $this->getParentObject();
                // Parent object may not have been created if it didn't exist as a property name.
                if ($parentObject) {
                    if (!$meta->unbound) {
                        $parentObject->{$meta->propertyName} = $this->getValueToAssign($meta);
                    } else {
                        $parentObject->{$meta->propertyName}[] = $this->getValueToAssign($meta);
                    }
                }
            }
        } else {
            $this->rootObject = $meta->phpObject;
        }
    }
private function endElement($parser, $name)
    {
        $meta = $this->metaStack->pop();

        if (!$this->metaStack->isEmpty()) {
            // Element in the XML may not exist as a property name in the class.
            // This could happen if the SDK is out of date with what eBay return.
            // It could also happen if eBay return elements that are not mentioned in any WSDL.
            if ($meta->propertyName !== '') {
                $parentObject = $this->getParentObject();
                // Parent object may not have been created if it didn't exist as a property name.
                if ($parentObject) {
                    if (!$meta->unbound) {
                        $parentObject->{$meta->propertyName} = $this->getValueToAssign($meta);
                    } else {
                        $parentObject->{$meta->propertyName}[] = $this->getValueToAssign($meta);
                    }
                }
            }
        } else {
            $this->rootObject = $meta->phpObject;
        }
    }
private function endElement ( $ parser , $ name ) { $ meta = $ this -> metaStack -> pop ( ) ; if ( ! $ this -> metaStack -> isEmpty ( ) ) { // Element in the XML may not exist as a property name in the class. // This could happen if the SDK is out of date with what eBay return. // It could also happen if eBay return elements that are not mentioned in any WSDL. if ( $ meta -> propertyName !== '' ) { $ parentObject = $ this -> getParentObject ( ) ; // Parent object may not have been created if it didn't exist as a property name. if ( $ parentObject ) { if ( ! $ meta -> unbound ) { $ parentObject -> { $ meta -> propertyName } = $ this -> getValueToAssign ( $ meta ) ; } else { $ parentObject -> { $ meta -> propertyName } [ ] = $ this -> getValueToAssign ( $ meta ) ; } } } } else { $ this -> rootObject = $ meta -> phpObject ; } }
Handler for the parser that is called at the end of each XML element.

Creates the required PHP object that represents the element and assigns
it to the parent PHP object.

@param resource $parser Reference to the XML parser calling the handler.
@param string $name The name of the element.
Handler for the parser that is called at the end of each XML element .