Scalr\Service\Aws\CloudFront\V20150727\CloudFrontApi::_loadDistributionConfigOriginList PHP Метод

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

Parses DistributionConfigOriginList
protected _loadDistributionConfigOriginList ( SimpleXMLElement $sxml ) : Scalr\Service\Aws\CloudFront\DataType\DistributionConfigOriginList
$sxml SimpleXMLElement
Результат Scalr\Service\Aws\CloudFront\DataType\DistributionConfigOriginList Returns DistributionConfigOriginList object
    protected function _loadDistributionConfigOriginList(\SimpleXMLElement $sxml)
    {
        $list = new DistributionConfigOriginList();
        $list->setCloudFront($this->cloudFront);
        if (!empty($sxml->Items->Origin)) {
            foreach ($sxml->Items->Origin as $v) {
                $item = new DistributionConfigOriginData();
                $item->customOriginConfig = $this->_loadCustomOriginConfigData($v->CustomOriginConfig);
                $item->domainName = $this->exist($v->DomainName) ? (string) $v->DomainName : null;
                $item->originId = (string) $v->Id;
                $item->originPath = $this->exist($v->OriginPath) ? (string) $v->OriginPath : null;
                $item->s3OriginConfig = $this->_loadDistributionS3OriginConfigData($v->S3OriginConfig);
                $list->append($item);
                unset($item);
            }
        }
        return $list;
    }