Scalr\Service\Aws\Ec2\V20140615\Ec2Api::_loadGroupList PHP Method

_loadGroupList() protected method

Loads GroupList from simple xml object
protected _loadGroupList ( SimpleXMLElement $sxml ) : Scalr\Service\Aws\Ec2\DataType\GroupList
$sxml SimpleXMLElement
return Scalr\Service\Aws\Ec2\DataType\GroupList Returns GroupList
    protected function _loadGroupList(\SimpleXMLElement $sxml)
    {
        $list = new GroupList();
        $list->setEc2($this->ec2);
        if (!empty($sxml->item)) {
            foreach ($sxml->item as $v) {
                $item = new GroupData();
                $item->setEc2($this->ec2);
                $item->groupId = $this->exist($v->groupId) ? (string) $v->groupId : null;
                $item->groupName = $this->exist($v->groupName) ? (string) $v->groupName : null;
                $list->append($item);
                unset($item);
            }
        }
        return $list;
    }
Ec2Api