Scalr\Service\Aws\Ec2\V20140615\Ec2Api::_loadEbsBlockDeviceData PHP Метод

_loadEbsBlockDeviceData() защищенный Метод

Loads EbsBlockDeviceData from simple xml object
protected _loadEbsBlockDeviceData ( SimpleXMLElement $sxml ) : EbsBlockDeviceData
$sxml SimpleXMLElement
Результат Scalr\Service\Aws\Ec2\DataType\EbsBlockDeviceData Returns EbsBlockDeviceData
    protected function _loadEbsBlockDeviceData(\SimpleXMLElement $sxml)
    {
        $item = null;
        if ($this->exist($sxml)) {
            $item = new EbsBlockDeviceData();
            $item->setEc2($this->ec2);
            $item->snapshotId = $this->exist($sxml->snapshotId) ? (string) $sxml->snapshotId : null;
            $item->volumeSize = $this->exist($sxml->volumeSize) ? (int) $sxml->volumeSize : null;
            $item->volumeType = $this->exist($sxml->volumeType) ? (string) $sxml->volumeType : null;
            $item->iops = $this->exist($sxml->iops) ? (int) $sxml->iops : null;
            $item->deleteOnTermination = $this->exist($sxml->deleteOnTermination) ? (string) $sxml->deleteOnTermination == 'true' : null;
            $item->encrypted = $this->exist($sxml->encrypted) ? (string) $sxml->encrypted == 'true' : null;
        }
        return $item;
    }
Ec2Api