protected function _loadInternetGatewayData(\SimpleXMLElement $v)
{
$item = null;
if ($this->exist($v)) {
$internetGatewayId = (string) $v->internetGatewayId;
$item = $this->ec2->getEntityManagerEnabled() ? $this->ec2->internetGateway->get($internetGatewayId) : null;
if ($item === null) {
$item = new InternetGatewayData($internetGatewayId);
$item->setEc2($this->ec2);
$bAttach = true;
} else {
$item->resetObject();
$item->internetGatewayId = $internetGatewayId;
$bAttach = false;
}
$item->setAttachmentSet($this->_loadInternetGatewayAttachmentList($v->attachmentSet, $internetGatewayId));
$item->setTagSet($this->_loadResourceTagSetList($v->tagSet));
if ($bAttach && $this->ec2->getEntityManagerEnabled()) {
$this->getEntityManager()->attach($item);
}
}
return $item;
}