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

_loadUserIdGroupPairList() protected method

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