public static function listDistributions()
	{
		if (!extension_loaded('openssl'))
		{
			self::__triggerError(sprintf("S3::listDistributions(): [%s] %s",
			"CloudFront functionality requires SSL"), __FILE__, __LINE__);
			return false;
		}

		$useSSL = self::$useSSL;
		self::$useSSL = true; // CloudFront requires SSL
		$rest = new S3Request('GET', '', '2010-11-01/distribution', 'cloudfront.amazonaws.com');
		$rest = self::__getCloudFrontResponse($rest);
		self::$useSSL = $useSSL;

		if ($rest->error === false && $rest->code !== 200)
			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
		if ($rest->error !== false)
		{
			self::__triggerError(sprintf("S3::listDistributions(): [%s] %s",
			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
			return false;
		}
		elseif ($rest->body instanceof SimpleXMLElement && isset($rest->body->DistributionSummary))
		{
			$list = array();
			if (isset($rest->body->Marker, $rest->body->MaxItems, $rest->body->IsTruncated))
			{
				//$info['marker'] = (string)$rest->body->Marker;
				//$info['maxItems'] = (int)$rest->body->MaxItems;
				//$info['isTruncated'] = (string)$rest->body->IsTruncated == 'true' ? true : false;
			}
			foreach ($rest->body->DistributionSummary as $summary)
				$list[(string)$summary->Id] = self::__parseCloudFrontDistributionConfig($summary);

			return $list;
		}
		return array();
	}
public static function listDistributions()
	{
		if (!extension_loaded('openssl'))
		{
			self::__triggerError(sprintf("S3::listDistributions(): [%s] %s",
			"CloudFront functionality requires SSL"), __FILE__, __LINE__);
			return false;
		}

		$useSSL = self::$useSSL;
		self::$useSSL = true; // CloudFront requires SSL
		$rest = new S3Request('GET', '', '2010-11-01/distribution', 'cloudfront.amazonaws.com');
		$rest = self::__getCloudFrontResponse($rest);
		self::$useSSL = $useSSL;

		if ($rest->error === false && $rest->code !== 200)
			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
		if ($rest->error !== false)
		{
			self::__triggerError(sprintf("S3::listDistributions(): [%s] %s",
			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
			return false;
		}
		elseif ($rest->body instanceof SimpleXMLElement && isset($rest->body->DistributionSummary))
		{
			$list = array();
			if (isset($rest->body->Marker, $rest->body->MaxItems, $rest->body->IsTruncated))
			{
				//$info['marker'] = (string)$rest->body->Marker;
				//$info['maxItems'] = (int)$rest->body->MaxItems;
				//$info['isTruncated'] = (string)$rest->body->IsTruncated == 'true' ? true : false;
			}
			foreach ($rest->body->DistributionSummary as $summary)
				$list[(string)$summary->Id] = self::__parseCloudFrontDistributionConfig($summary);

			return $list;
		}
		return array();
	}
public static function listDistributions ( ) { if ( ! extension_loaded ( 'openssl' ) ) { self :: __triggerError ( sprintf ( "S3::listDistributions(): [%s] %s" , "CloudFront functionality requires SSL" ) , __FILE__ , __LINE__ ) ; return false ; } $ useSSL = self :: $ useSSL ; self :: $ useSSL = true ; // CloudFront requires SSL $ rest = new S3Request ( 'GET' , '' , '2010-11-01/distribution' , 'cloudfront.amazonaws.com' ) ; $ rest = self :: __getCloudFrontResponse ( $ rest ) ; self :: $ useSSL = $ useSSL ; if ( $ rest -> error === false && $ rest -> code !== 200 ) $ rest -> error = array ( 'code' => $ rest -> code , 'message' => 'Unexpected HTTP status' ) ; if ( $ rest -> error !== false ) { self :: __triggerError ( sprintf ( "S3::listDistributions(): [%s] %s" , $ rest -> error [ 'code' ] , $ rest -> error [ 'message' ] ) , __FILE__ , __LINE__ ) ; return false ; } elseif ( $ rest -> body instanceof SimpleXMLElement && isset ( $ rest -> body -> DistributionSummary ) ) { $ list = array ( ) ; if ( isset ( $ rest -> body -> Marker , $ rest -> body -> MaxItems , $ rest -> body -> IsTruncated ) ) { //$info['marker'] = (string)$rest->body->Marker; //$info['maxItems'] = (int)$rest->body->MaxItems; //$info['isTruncated'] = (string)$rest->body->IsTruncated == 'true' ? true : false; } foreach ( $ rest -> body -> DistributionSummary as $ summary ) $ list [ ( string ) $ summary -> Id ] = self :: __parseCloudFrontDistributionConfig ( $ summary ) ; return $ list ; } return array ( ) ; }
Get a list of CloudFront distributions

@return array
Get a list of CloudFront distributions