Scalr\Service\Aws\CloudFront\V20150727\CloudFrontApi::_loadTrustedSignerList PHP Method

_loadTrustedSignerList() protected method

Parses TrustedSignerList
protected _loadTrustedSignerList ( SimpleXMLElement $sxml ) : Scalr\Service\Aws\CloudFront\DataType\TrustedSignerList
$sxml SimpleXMLElement
return Scalr\Service\Aws\CloudFront\DataType\TrustedSignerList Returns TrustedSignerList object
    protected function _loadTrustedSignerList(\SimpleXMLElement $sxml)
    {
        $list = new TrustedSignerList();
        $list->setCloudFront($this->cloudFront);
        $list->setEnabled($this->exist($sxml->Enabled) ? (string) $sxml->Enabled == 'true' : null);
        if (!empty($sxml->Items->Singer)) {
            foreach ($sxml->Items->Singer as $v) {
                $item = new TrustedSignerData();
                $item->awsAccountNumber = (string) $v->AwsAccountNumber;
                $item->setKeyPairIds($this->_loadKeyPairList($v->KeyPairIds));
                $list->append($item);
                unset($item);
            }
        }
        return $list;
    }