Scalr\Service\Aws\Ec2\V20150415\Ec2Api::_loadRouteList PHP Method

_loadRouteList() protected method

Loads RouteList from simple xml object
protected _loadRouteList ( SimpleXMLElement $sxml, string $routeTableId = null ) : Scalr\Service\Aws\Ec2\DataType\RouteList
$sxml SimpleXMLElement
$routeTableId string optional The ID of the Route table
return Scalr\Service\Aws\Ec2\DataType\RouteList Returns RouteList
    protected function _loadRouteList(\SimpleXMLElement $sxml, $routeTableId = null)
    {
        $list = new RouteList();
        $list->setEc2($this->ec2);
        if ($routeTableId !== null) {
            $list->setRouteTableId($routeTableId);
            $list->_setExternalKeysUpdated(true);
        }
        if (!empty($sxml->item)) {
            foreach ($sxml->item as $v) {
                $item = $this->_loadRouteData($v);
                $list->append($item);
                unset($item);
            }
        }
        return $list;
    }
Ec2Api