PHP Class CloudFront, CloudFront-PHP-Invalidator

Mostrar archivo Open project: subchild/CloudFront-PHP-Invalidator Class Usage Examples

Public Methods

Method Description
__construct ( $accessKeyId, $secretKey, $distributionId, $serviceUrl = "https://cloudfront.amazonaws.com/" ) Constructs a CloudFront object and assigns required account values
getResponseCode ( ) : mixed Getter method for API response codes
getResponseMessage ( ) : mixed Getter method to get the response messages generated by our class.
invalidate ( $keys ) : boolean | string Invalidates object with passed key on CloudFront

Private Methods

Method Description
generateAuthKey ( $date ) : string Returns header string containing encoded authentication key
makeRequestBody ( $objects ) : string Makes the request body as expected by CloudFront API
setRequestHeaders ( HTTP_Request2 $req ) Sets the common headers required by CloudFront API

Method Details

__construct() public method

Constructs a CloudFront object and assigns required account values
public __construct ( $accessKeyId, $secretKey, $distributionId, $serviceUrl = "https://cloudfront.amazonaws.com/" )
$accessKeyId {String} AWS access key id
$secretKey {String} AWS secret key
$distributionId {String} CloudFront distribution id
$serviceUrl {String} Optional parameter for overriding cloudfront api URL

getResponseCode() public method

Getter method for API response codes
public getResponseCode ( ) : mixed
return mixed

getResponseMessage() public method

Getter method to get the response messages generated by our class.
public getResponseMessage ( ) : mixed
return mixed

invalidate() public method

Invalidates object with passed key on CloudFront
public invalidate ( $keys ) : boolean | string
$keys
return boolean | string