PHP Class Gaufrette\Adapter\AmazonS3

See the AwsS3 adapter for using the AWS SDK for PHP v2.x.
Author: Antoine Hérault ([email protected])
Author: Leszek Prabucki ([email protected])
Inheritance: implements Gaufrette\Adapter, implements Gaufrette\Adapter\MetadataSupporter
显示文件 Open project: knplabs/gaufrette

Protected Properties

Property Type Description
$bucket
$ensureBucket
$metadata
$options
$service

Public Methods

Method Description
__construct ( AmazonS3 $service, $bucket, $options = [] )
delete ( $key )
exists ( $key )
getAcl ( ) : string Get the acl used when writing files.
getDirectory ( ) : string Get the directory the user has access to.
getMetadata ( $key )
isDirectory ( $key )
keys ( )
mtime ( $key )
read ( $key )
rename ( $sourceKey, $targetKey )
setAcl ( string $acl ) Set the acl used when writing files.
setDirectory ( string $directory ) Set the base directory the user will have access to.
setMetadata ( $key, $metadata )
write ( $key, $content )

Private Methods

Method Description
computePath ( string $key ) : string Computes the path for the specified key taking the bucket in account.
ensureBucketExists ( ) Ensures the specified bucket exists. If the bucket does not exists and the create parameter is set to true, it will try to create the bucket.

Method Details

__construct() public method

public __construct ( AmazonS3 $service, $bucket, $options = [] )
$service AmazonS3

delete() public method

public delete ( $key )

exists() public method

public exists ( $key )

getAcl() public method

Get the acl used when writing files.
public getAcl ( ) : string
return string

getDirectory() public method

Get the directory the user has access to.
public getDirectory ( ) : string
return string

getMetadata() public method

public getMetadata ( $key )

isDirectory() public method

public isDirectory ( $key )

keys() public method

public keys ( )

mtime() public method

public mtime ( $key )

read() public method

public read ( $key )

rename() public method

public rename ( $sourceKey, $targetKey )

setAcl() public method

Set the acl used when writing files.
public setAcl ( string $acl )
$acl string

setDirectory() public method

Set the base directory the user will have access to.
public setDirectory ( string $directory )
$directory string

setMetadata() public method

public setMetadata ( $key, $metadata )

write() public method

public write ( $key, $content )

Property Details

$bucket protected_oe property

protected $bucket

$ensureBucket protected_oe property

protected $ensureBucket

$metadata protected_oe property

protected $metadata

$options protected_oe property

protected $options

$service protected_oe property

protected $service