Scalr\Service\Aws\CloudFront\V20120701\CloudFrontApi::_loadDistributionConfigLoggingData PHP Method

_loadDistributionConfigLoggingData() protected method

Loads DistributionConfigLoggingData from simple xml object
protected _loadDistributionConfigLoggingData ( SimpleXMLElement $sxml ) : Scalr\Service\Aws\CloudFront\DataType\DistributionConfigLoggingData
$sxml SimpleXMLElement
return Scalr\Service\Aws\CloudFront\DataType\DistributionConfigLoggingData Returns DistributionConfigLoggingData
    protected function _loadDistributionConfigLoggingData(\SimpleXMLElement $sxml)
    {
        $item = null;
        if ($this->exist($sxml)) {
            $item = new DistributionConfigLoggingData();
            $item->setCloudFront($this->cloudFront);
            $item->bucket = $this->exist($sxml->Bucket) ? (string) $sxml->Bucket : null;
            $item->enabled = $this->exist($sxml->Enabled) ? (string) $sxml->Enabled == 'true' : null;
            $item->prefix = $this->exist($sxml->Prefix) ? (string) $sxml->Prefix : null;
            $item->includeCookies = $this->exist($sxml->IncludeCookies) ? (string) $sxml->IncludeCookies == 'true' : null;
        }
        return $item;
    }