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

_loadInternetGatewayAttachmentList() protected method

Loads InternetGatewayAttachmentList from simple xml object
protected _loadInternetGatewayAttachmentList ( SimpleXMLElement $sxml, string $internetGatewayId = null ) : Scalr\Service\Aws\Ec2\DataType\InternetGatewayAttachmentList
$sxml SimpleXMLElement
$internetGatewayId string The ID of the Internet Gateway
return Scalr\Service\Aws\Ec2\DataType\InternetGatewayAttachmentList Returns InternetGatewayAttachmentList
    protected function _loadInternetGatewayAttachmentList(\SimpleXMLElement $sxml, $internetGatewayId = null)
    {
        $list = new InternetGatewayAttachmentList();
        $list->setEc2($this->ec2);
        if ($internetGatewayId !== null) {
            $list->setInternetGatewayId($internetGatewayId);
            $list->_setExternalKeysUpdated(true);
        }
        if (!empty($sxml->item)) {
            foreach ($sxml->item as $v) {
                $item = $this->_loadInternetGatewayAttachmentData($v);
                $list->append($item);
                unset($item);
            }
        }
        return $list;
    }
Ec2Api