original_string: private static function __parseCloudFrontDistributionConfig(&$node)
  	{
  		if (isset($node->DistributionConfig))
  			return self::__parseCloudFrontDistributionConfig($node->DistributionConfig);
  
  		$dist = array();
  		if (isset($node->Id, $node->Status, $node->LastModifiedTime, $node->DomainName))
  		{
  			$dist['id'] = (string)$node->Id;
  			$dist['status'] = (string)$node->Status;
  			$dist['time'] = strtotime((string)$node->LastModifiedTime);
  			$dist['domain'] = (string)$node->DomainName;
  		}
  
  		if (isset($node->CallerReference))
  			$dist['callerReference'] = (string)$node->CallerReference;
  
  		if (isset($node->Enabled))
  			$dist['enabled'] = (string)$node->Enabled == 'true' ? true : false;
  
  		if (isset($node->S3Origin))
  		{
  			if (isset($node->S3Origin->DNSName))
  				$dist['origin'] = (string)$node->S3Origin->DNSName;
  
  			$dist['originAccessIdentity'] = isset($node->S3Origin->OriginAccessIdentity) ?
  			(string)$node->S3Origin->OriginAccessIdentity : null;
  		}
  
  		$dist['defaultRootObject'] = isset($node->DefaultRootObject) ? (string)$node->DefaultRootObject : null;
  
  		$dist['cnames'] = array();
  		if (isset($node->CNAME))
  			foreach ($node->CNAME as $cname)
  				$dist['cnames'][(string)$cname] = (string)$cname;
  
  		$dist['trustedSigners'] = array();
  		if (isset($node->TrustedSigners))
  			foreach ($node->TrustedSigners as $signer)
  			{
  				if (isset($signer->Self))
  					$dist['trustedSigners'][''] = 'Self';
  				elseif (isset($signer->KeyPairId))
  					$dist['trustedSigners'][(string)$signer->KeyPairId] = 'KeyPairId';
  				elseif (isset($signer->AwsAccountNumber))
  					$dist['trustedSigners'][(string)$signer->AwsAccountNumber] = 'AwsAccountNumber';
  			}
  
  		$dist['comment'] = isset($node->Comment) ? (string)$node->Comment : null;
  		return $dist;
  	}
code: private static function __parseCloudFrontDistributionConfig(&$node)
  	{
  		if (isset($node->DistributionConfig))
  			return self::__parseCloudFrontDistributionConfig($node->DistributionConfig);
  
  		$dist = array();
  		if (isset($node->Id, $node->Status, $node->LastModifiedTime, $node->DomainName))
  		{
  			$dist['id'] = (string)$node->Id;
  			$dist['status'] = (string)$node->Status;
  			$dist['time'] = strtotime((string)$node->LastModifiedTime);
  			$dist['domain'] = (string)$node->DomainName;
  		}
  
  		if (isset($node->CallerReference))
  			$dist['callerReference'] = (string)$node->CallerReference;
  
  		if (isset($node->Enabled))
  			$dist['enabled'] = (string)$node->Enabled == 'true' ? true : false;
  
  		if (isset($node->S3Origin))
  		{
  			if (isset($node->S3Origin->DNSName))
  				$dist['origin'] = (string)$node->S3Origin->DNSName;
  
  			$dist['originAccessIdentity'] = isset($node->S3Origin->OriginAccessIdentity) ?
  			(string)$node->S3Origin->OriginAccessIdentity : null;
  		}
  
  		$dist['defaultRootObject'] = isset($node->DefaultRootObject) ? (string)$node->DefaultRootObject : null;
  
  		$dist['cnames'] = array();
  		if (isset($node->CNAME))
  			foreach ($node->CNAME as $cname)
  				$dist['cnames'][(string)$cname] = (string)$cname;
  
  		$dist['trustedSigners'] = array();
  		if (isset($node->TrustedSigners))
  			foreach ($node->TrustedSigners as $signer)
  			{
  				if (isset($signer->Self))
  					$dist['trustedSigners'][''] = 'Self';
  				elseif (isset($signer->KeyPairId))
  					$dist['trustedSigners'][(string)$signer->KeyPairId] = 'KeyPairId';
  				elseif (isset($signer->AwsAccountNumber))
  					$dist['trustedSigners'][(string)$signer->AwsAccountNumber] = 'AwsAccountNumber';
  			}
  
  		$dist['comment'] = isset($node->Comment) ? (string)$node->Comment : null;
  		return $dist;
  	}
code_tokens: private static function __parseCloudFrontDistributionConfig ( & $ node ) { if ( isset ( $ node -> DistributionConfig ) ) return self :: __parseCloudFrontDistributionConfig ( $ node -> DistributionConfig ) ; $ dist = array ( ) ; if ( isset ( $ node -> Id , $ node -> Status , $ node -> LastModifiedTime , $ node -> DomainName ) ) { $ dist [ 'id' ] = ( string ) $ node -> Id ; $ dist [ 'status' ] = ( string ) $ node -> Status ; $ dist [ 'time' ] = strtotime ( ( string ) $ node -> LastModifiedTime ) ; $ dist [ 'domain' ] = ( string ) $ node -> DomainName ; } if ( isset ( $ node -> CallerReference ) ) $ dist [ 'callerReference' ] = ( string ) $ node -> CallerReference ; if ( isset ( $ node -> Enabled ) ) $ dist [ 'enabled' ] = ( string ) $ node -> Enabled == 'true' ? true : false ; if ( isset ( $ node -> S3Origin ) ) { if ( isset ( $ node -> S3Origin -> DNSName ) ) $ dist [ 'origin' ] = ( string ) $ node -> S3Origin -> DNSName ; $ dist [ 'originAccessIdentity' ] = isset ( $ node -> S3Origin -> OriginAccessIdentity ) ? ( string ) $ node -> S3Origin -> OriginAccessIdentity : null ; } $ dist [ 'defaultRootObject' ] = isset ( $ node -> DefaultRootObject ) ? ( string ) $ node -> DefaultRootObject : null ; $ dist [ 'cnames' ] = array ( ) ; if ( isset ( $ node -> CNAME ) ) foreach ( $ node -> CNAME as $ cname ) $ dist [ 'cnames' ] [ ( string ) $ cname ] = ( string ) $ cname ; $ dist [ 'trustedSigners' ] = array ( ) ; if ( isset ( $ node -> TrustedSigners ) ) foreach ( $ node -> TrustedSigners as $ signer ) { if ( isset ( $ signer -> Self ) ) $ dist [ 'trustedSigners' ] [ '' ] = 'Self' ; elseif ( isset ( $ signer -> KeyPairId ) ) $ dist [ 'trustedSigners' ] [ ( string ) $ signer -> KeyPairId ] = 'KeyPairId' ; elseif ( isset ( $ signer -> AwsAccountNumber ) ) $ dist [ 'trustedSigners' ] [ ( string ) $ signer -> AwsAccountNumber ] = 'AwsAccountNumber' ; } $ dist [ 'comment' ] = isset ( $ node -> Comment ) ? ( string ) $ node -> Comment : null ; return $ dist ; }
docstring: Parse a CloudFront distribution config
  
  See http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/index.html?GetDistribution.html
  
  @internal Used to parse the CloudFront DistributionConfig node to an array
  @param object &$node DOMNode
  @return array
docstring_tokens: Parse a CloudFront distribution config