src/Value/UserActivities/UserActivities.php
public static function fromXml(\DOMDocument $xml)
    {
        $static = new static();

        $loans = $xml->getElementsByTagName('loan');
        $static->loans = LoanCollection::fromXml($loans);

        $loanHistory = $xml->getElementsByTagName('loanHistory');
        $static->loanHistory = LoanCollection::fromXml($loanHistory);

        $holds = $xml->getElementsByTagName('hold');
        $static->holds = HoldCollection::fromXml($holds);

        $expenses = $xml->getElementsByTagName('fine');
        $static->expenses = ExpenseCollection::fromXml($expenses);

        $totalFine = $xml->getElementsByTagName('totalFine');
        $static->totalFine = FloatLiteral::fromXml($totalFine);

        $totalCost = $xml->getElementsByTagName('totalCost');
        $static->totalCost = FloatLiteral::fromXml($totalCost);

        $message = $xml->getElementsByTagName('message');
        $static->message = StringLiteral::fromXml($message);

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

        return $static;
    }
public static function fromXml(\DOMDocument $xml)
    {
        $static = new static();

        $loans = $xml->getElementsByTagName('loan');
        $static->loans = LoanCollection::fromXml($loans);

        $loanHistory = $xml->getElementsByTagName('loanHistory');
        $static->loanHistory = LoanCollection::fromXml($loanHistory);

        $holds = $xml->getElementsByTagName('hold');
        $static->holds = HoldCollection::fromXml($holds);

        $expenses = $xml->getElementsByTagName('fine');
        $static->expenses = ExpenseCollection::fromXml($expenses);

        $totalFine = $xml->getElementsByTagName('totalFine');
        $static->totalFine = FloatLiteral::fromXml($totalFine);

        $totalCost = $xml->getElementsByTagName('totalCost');
        $static->totalCost = FloatLiteral::fromXml($totalCost);

        $message = $xml->getElementsByTagName('message');
        $static->message = StringLiteral::fromXml($message);

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

        return $static;
    }
public static function fromXml ( \ DOMDocument $ xml ) { $ static = new static ( ) ; $ loans = $ xml -> getElementsByTagName ( 'loan' ) ; $ static -> loans = LoanCollection :: fromXml ( $ loans ) ; $ loanHistory = $ xml -> getElementsByTagName ( 'loanHistory' ) ; $ static -> loanHistory = LoanCollection :: fromXml ( $ loanHistory ) ; $ holds = $ xml -> getElementsByTagName ( 'hold' ) ; $ static -> holds = HoldCollection :: fromXml ( $ holds ) ; $ expenses = $ xml -> getElementsByTagName ( 'fine' ) ; $ static -> expenses = ExpenseCollection :: fromXml ( $ expenses ) ; $ totalFine = $ xml -> getElementsByTagName ( 'totalFine' ) ; $ static -> totalFine = FloatLiteral :: fromXml ( $ totalFine ) ; $ totalCost = $ xml -> getElementsByTagName ( 'totalCost' ) ; $ static -> totalCost = FloatLiteral :: fromXml ( $ totalCost ) ; $ message = $ xml -> getElementsByTagName ( 'message' ) ; $ static -> message = StringLiteral :: fromXml ( $ message ) ; $ loanHistoryConfig = $ xml -> getElementsByTagName ( 'loanHistoryConfigurable' ) ; $ static -> loanHistoryConfigurable = BoolLiteral :: fromXml ( $ loanHistoryConfig ) ; return $ static ; }
Builds a UserActivities object from XML.

@param \DomDocument $xml
The xml tree containing the user activities.

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