original_string: public static function updateDistribution($dist)
  	{
  		if (!extension_loaded('openssl'))
  		{
  			self::__triggerError(sprintf("S3::updateDistribution({$dist['id']}): %s",
  			"CloudFront functionality requires SSL"), __FILE__, __LINE__);
  			return false;
  		}
  
  		$useSSL = self::$useSSL;
  
  		self::$useSSL = true; // CloudFront requires SSL
  		$rest = new S3Request('PUT', '', '2010-11-01/distribution/'.$dist['id'].'/config', 'cloudfront.amazonaws.com');
  		$rest->data = self::__getCloudFrontDistributionConfigXML(
  			$dist['origin'],
  			$dist['enabled'],
  			$dist['comment'],
  			$dist['callerReference'],
  			$dist['cnames'],
  			$dist['defaultRootObject'],
  			$dist['originAccessIdentity'],
  			$dist['trustedSigners']
  		);
  
  		$rest->size = strlen($rest->data);
  		$rest->setHeader('If-Match', $dist['hash']);
  		$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::updateDistribution({$dist['id']}): [%s] %s",
  			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
  			return false;
  		} else {
  			$dist = self::__parseCloudFrontDistributionConfig($rest->body);
  			$dist['hash'] = $rest->headers['hash'];
  			return $dist;
  		}
  		return false;
  	}
code: public static function updateDistribution($dist)
  	{
  		if (!extension_loaded('openssl'))
  		{
  			self::__triggerError(sprintf("S3::updateDistribution({$dist['id']}): %s",
  			"CloudFront functionality requires SSL"), __FILE__, __LINE__);
  			return false;
  		}
  
  		$useSSL = self::$useSSL;
  
  		self::$useSSL = true; // CloudFront requires SSL
  		$rest = new S3Request('PUT', '', '2010-11-01/distribution/'.$dist['id'].'/config', 'cloudfront.amazonaws.com');
  		$rest->data = self::__getCloudFrontDistributionConfigXML(
  			$dist['origin'],
  			$dist['enabled'],
  			$dist['comment'],
  			$dist['callerReference'],
  			$dist['cnames'],
  			$dist['defaultRootObject'],
  			$dist['originAccessIdentity'],
  			$dist['trustedSigners']
  		);
  
  		$rest->size = strlen($rest->data);
  		$rest->setHeader('If-Match', $dist['hash']);
  		$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::updateDistribution({$dist['id']}): [%s] %s",
  			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
  			return false;
  		} else {
  			$dist = self::__parseCloudFrontDistributionConfig($rest->body);
  			$dist['hash'] = $rest->headers['hash'];
  			return $dist;
  		}
  		return false;
  	}
code_tokens: public static function updateDistribution ( $ dist ) { if ( ! extension_loaded ( 'openssl' ) ) { self :: __triggerError ( sprintf ( "S3::updateDistribution({$dist['id']}): %s" , "CloudFront functionality requires SSL" ) , __FILE__ , __LINE__ ) ; return false ; } $ useSSL = self :: $ useSSL ; self :: $ useSSL = true ; // CloudFront requires SSL $ rest = new S3Request ( 'PUT' , '' , '2010-11-01/distribution/' . $ dist [ 'id' ] . '/config' , 'cloudfront.amazonaws.com' ) ; $ rest -> data = self :: __getCloudFrontDistributionConfigXML ( $ dist [ 'origin' ] , $ dist [ 'enabled' ] , $ dist [ 'comment' ] , $ dist [ 'callerReference' ] , $ dist [ 'cnames' ] , $ dist [ 'defaultRootObject' ] , $ dist [ 'originAccessIdentity' ] , $ dist [ 'trustedSigners' ] ) ; $ rest -> size = strlen ( $ rest -> data ) ; $ rest -> setHeader ( 'If-Match' , $ dist [ 'hash' ] ) ; $ 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::updateDistribution({$dist['id']}): [%s] %s" , $ rest -> error [ 'code' ] , $ rest -> error [ 'message' ] ) , __FILE__ , __LINE__ ) ; return false ; } else { $ dist = self :: __parseCloudFrontDistributionConfig ( $ rest -> body ) ; $ dist [ 'hash' ] = $ rest -> headers [ 'hash' ] ; return $ dist ; } return false ; }
docstring: Update a CloudFront distribution
  
  @param array $dist Distribution array info identical to output of getDistribution()
  @return array | false
docstring_tokens: Update a CloudFront distribution