src/Value/UserActivities/Hold.php
public static function fromXml(\DOMElement $xml)
    {
        $static = new static();
        $static->libraryItemMetadata = LibraryItemMetadata::fromXml($xml);
        $static->pickupLocation = PickupLocation::fromXml($xml);

        $requestStartDate = $xml->getElementsByTagName('requestDate');
        $requestEndDate = $xml->getElementsByTagName('endRequestDate');
        $static->requestDateRange = DateTimeRange::fromXml($requestStartDate, $requestEndDate);

        $holdStartDate = $xml->getElementsByTagName('holdDate');
        $holdEndDate = $xml->getElementsByTagName('endHoldDate');
        $static->holdDateRange = DateTimeRange::fromXml($holdStartDate, $holdEndDate);

        $cancelable = $xml->getElementsByTagName('cancelable');
        $static->cancelable = BoolLiteral::fromXml($cancelable);

        $stringLiterals = array(
            'requestNumber' => $xml->getElementsByTagName('requestNumber'),
            'sequence' => $xml->getElementsByTagName('sequence'),
            'queuePosition' => $xml->getElementsByTagName('queuePosition'),
            'itemSequence' => $xml->getElementsByTagName('itemSequence'),
            'status' => $xml->getElementsByTagName('status'),
        );
        foreach ($stringLiterals as $propertyName => $xmlTag) {
            $static->$propertyName = StringLiteral::fromXml($xmlTag);
        }

        return $static;
    }
public static function fromXml(\DOMElement $xml)
    {
        $static = new static();
        $static->libraryItemMetadata = LibraryItemMetadata::fromXml($xml);
        $static->pickupLocation = PickupLocation::fromXml($xml);

        $requestStartDate = $xml->getElementsByTagName('requestDate');
        $requestEndDate = $xml->getElementsByTagName('endRequestDate');
        $static->requestDateRange = DateTimeRange::fromXml($requestStartDate, $requestEndDate);

        $holdStartDate = $xml->getElementsByTagName('holdDate');
        $holdEndDate = $xml->getElementsByTagName('endHoldDate');
        $static->holdDateRange = DateTimeRange::fromXml($holdStartDate, $holdEndDate);

        $cancelable = $xml->getElementsByTagName('cancelable');
        $static->cancelable = BoolLiteral::fromXml($cancelable);

        $stringLiterals = array(
            'requestNumber' => $xml->getElementsByTagName('requestNumber'),
            'sequence' => $xml->getElementsByTagName('sequence'),
            'queuePosition' => $xml->getElementsByTagName('queuePosition'),
            'itemSequence' => $xml->getElementsByTagName('itemSequence'),
            'status' => $xml->getElementsByTagName('status'),
        );
        foreach ($stringLiterals as $propertyName => $xmlTag) {
            $static->$propertyName = StringLiteral::fromXml($xmlTag);
        }

        return $static;
    }
public static function fromXml ( \ DOMElement $ xml ) { $ static = new static ( ) ; $ static -> libraryItemMetadata = LibraryItemMetadata :: fromXml ( $ xml ) ; $ static -> pickupLocation = PickupLocation :: fromXml ( $ xml ) ; $ requestStartDate = $ xml -> getElementsByTagName ( 'requestDate' ) ; $ requestEndDate = $ xml -> getElementsByTagName ( 'endRequestDate' ) ; $ static -> requestDateRange = DateTimeRange :: fromXml ( $ requestStartDate , $ requestEndDate ) ; $ holdStartDate = $ xml -> getElementsByTagName ( 'holdDate' ) ; $ holdEndDate = $ xml -> getElementsByTagName ( 'endHoldDate' ) ; $ static -> holdDateRange = DateTimeRange :: fromXml ( $ holdStartDate , $ holdEndDate ) ; $ cancelable = $ xml -> getElementsByTagName ( 'cancelable' ) ; $ static -> cancelable = BoolLiteral :: fromXml ( $ cancelable ) ; $ stringLiterals = array ( 'requestNumber' => $ xml -> getElementsByTagName ( 'requestNumber' ) , 'sequence' => $ xml -> getElementsByTagName ( 'sequence' ) , 'queuePosition' => $ xml -> getElementsByTagName ( 'queuePosition' ) , 'itemSequence' => $ xml -> getElementsByTagName ( 'itemSequence' ) , 'status' => $ xml -> getElementsByTagName ( 'status' ) , ) ; foreach ( $ stringLiterals as $ propertyName => $ xmlTag ) { $ static -> $ propertyName = StringLiteral :: fromXml ( $ xmlTag ) ; } return $ static ; }
Builds a Hold object from XML.

@param \DOMElement $xml
The xml element containing the hold.

@return Hold
A Hold object.
Builds a Hold object from XML .