protected _loadProductCodeSetList ( SimpleXMLElement $sxml ) : Scalr\Service\Aws\Ec2\DataType\ProductCodeSetList | ||
$sxml | SimpleXMLElement | |
return | Scalr\Service\Aws\Ec2\DataType\ProductCodeSetList | Returns ProductCodeSetList |
protected function _loadProductCodeSetList(\SimpleXMLElement $sxml)
{
$list = new ProductCodeSetList();
$list->setEc2($this->ec2);
if (!empty($sxml->item)) {
foreach ($sxml->item as $v) {
$item = new ProductCodeSetData();
$item->setEc2($this->ec2);
$item->productCode = $this->exist($v->productCode) ? (string) $v->productCode : null;
$item->type = $this->exist($v->type) ? (string) $v->type : null;
$list->append($item);
unset($item);
}
}
return $list;
}