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

_loadAttachmentSetResponseList() protected method

Loads AttachmentSetResponseList from simple xml object
protected _loadAttachmentSetResponseList ( SimpleXMLElement $sxml ) : Scalr\Service\Aws\Ec2\DataType\AttachmentSetResponseList
$sxml SimpleXMLElement
return Scalr\Service\Aws\Ec2\DataType\AttachmentSetResponseList Returns AttachmentSetResponseList
    protected function _loadAttachmentSetResponseList(\SimpleXMLElement $sxml)
    {
        $list = new AttachmentSetResponseList();
        $list->setEc2($this->ec2);
        if (!empty($sxml->item)) {
            foreach ($sxml->item as $v) {
                $item = new AttachmentSetResponseData();
                $item->setEc2($this->ec2);
                $item->volumeId = $this->exist($v->volumeId) ? (string) $v->volumeId : null;
                $item->status = $this->exist($v->status) ? (string) $v->status : null;
                $item->instanceId = $this->exist($v->instanceId) ? (string) $v->instanceId : null;
                $item->attachTime = $this->exist($v->attachTime) ? new DateTime((string) $v->attachTime, new DateTimeZone('UTC')) : null;
                $item->deleteOnTermination = $this->exist($v->deleteOnTermination) ? (string) $v->deleteOnTermination == 'true' : null;
                $item->device = $this->exist($v->device) ? (string) $v->device : null;
                $list->append($item);
                unset($item);
            }
        }
        return $list;
    }
Ec2Api