PHP Class S3Request

Mostrar archivo Open project: tpyo/amazon-s3-php-class Class Usage Examples

Public Properties

Property Type Description
$data array PUT post fields
$fp boolean Use HTTP PUT?
$response object S3 request respone
$size integer PUT file size

Public Methods

Method Description
__construct ( string $verb, string $bucket = '', string $uri = '', string $endpoint = 's3.amazonaws.com' ) : mixed Constructor
getResponse ( ) : object | false Get the S3 response
setAmzHeader ( string $key, string $value ) : void Set x-amz-meta-* header
setHeader ( string $key, string $value ) : void Set request header
setParameter ( string $key, string $value ) : void Set request parameter

Private Methods

Method Description
__dnsBucketName ( string $bucket ) : boolean Check DNS conformity
__responseHeaderCallback ( resource $curl, string $data ) : integer CURL header callback
__responseWriteCallback ( &$curl, &$data ) : integer CURL write callback
__sortMetaHeadersCmp ( string $a, string $b ) : integer Sort compare for meta headers

Method Details

__construct() public method

Constructor
public __construct ( string $verb, string $bucket = '', string $uri = '', string $endpoint = 's3.amazonaws.com' ) : mixed
$verb string Verb
$bucket string Bucket name
$uri string Object URI
$endpoint string AWS endpoint URI
return mixed

getResponse() public method

Get the S3 response
public getResponse ( ) : object | false
return object | false | false

setAmzHeader() public method

Set x-amz-meta-* header
public setAmzHeader ( string $key, string $value ) : void
$key string Key
$value string Value
return void

setHeader() public method

Set request header
public setHeader ( string $key, string $value ) : void
$key string Key
$value string Value
return void

setParameter() public method

Set request parameter
public setParameter ( string $key, string $value ) : void
$key string Key
$value string Value
return void

Property Details

$data public_oe property

PUT post fields
public array $data
return array

$fp public_oe property

Use HTTP PUT?
public bool $fp
return boolean

$response public_oe property

S3 request respone
public object $response
return object

$size public_oe property

PUT file size
public int $size
return integer