src/ServiceManagement/Models/ListLocationsResult.php
public static function create($parsed)
    {
        $result = new self();

        $result->_locations = [];
        $entries = [];

        if (!empty($parsed)) {
            $entries = Utilities::getArray($parsed[Resources::XTAG_LOCATION]);
        }

        foreach ($entries as $value) {
            $location = new Location();
            $location->setName(Utilities::tryGetValue($value, Resources::XTAG_NAME));
            $location->setDisplayName(
                Utilities::tryGetValue($value, Resources::XTAG_DISPLAY_NAME)
            );
            $result->_locations[] = $location;
        }

        return $result;
    }
public static function create($parsed)
    {
        $result = new self();

        $result->_locations = [];
        $entries = [];

        if (!empty($parsed)) {
            $entries = Utilities::getArray($parsed[Resources::XTAG_LOCATION]);
        }

        foreach ($entries as $value) {
            $location = new Location();
            $location->setName(Utilities::tryGetValue($value, Resources::XTAG_NAME));
            $location->setDisplayName(
                Utilities::tryGetValue($value, Resources::XTAG_DISPLAY_NAME)
            );
            $result->_locations[] = $location;
        }

        return $result;
    }
public static function create ( $ parsed ) { $ result = new self ( ) ; $ result -> _locations = [ ] ; $ entries = [ ] ; if ( ! empty ( $ parsed ) ) { $ entries = Utilities :: getArray ( $ parsed [ Resources :: XTAG_LOCATION ] ) ; } foreach ( $ entries as $ value ) { $ location = new Location ( ) ; $ location -> setName ( Utilities :: tryGetValue ( $ value , Resources :: XTAG_NAME ) ) ; $ location -> setDisplayName ( Utilities :: tryGetValue ( $ value , Resources :: XTAG_DISPLAY_NAME ) ) ; $ result -> _locations [ ] = $ location ; } return $ result ; }
Creates new ListLocationsResult from parsed response body.

@param array $parsed The parsed response body

@return ListLocationsResult
Creates new ListLocationsResult from parsed response body .