PHP Class Gaufrette\Adapter\AwsS3

Author: Michael Dowling ([email protected])
Inheritance: implements Gaufrette\Adapter, implements Gaufrette\Adapter\MetadataSupporter, implements Gaufrette\Adapter\ListKeysAware, implements Gaufrette\Adapter\SizeCalculator
Exibir arquivo Open project: knplabs/gaufrette Class Usage Examples

Protected Properties

Property Type Description
$bucket
$bucketExists
$detectContentType
$metadata
$options
$service

Public Methods

Method Description
__construct ( S3Client $service, $bucket, array $options = [], $detectContentType = false )
delete ( $key )
exists ( $key )
getMetadata ( $key )
getUrl ( string $key, array $options = [] ) : string Gets the publicly accessible URL of an Amazon S3 object.
isDirectory ( $key )
keys ( )
listKeys ( $prefix = '' )
mtime ( $key )
read ( $key )
rename ( $sourceKey, $targetKey )
setMetadata ( $key, $metadata )
size ( $key )
write ( $key, $content )

Protected Methods

Method Description
computeKey ( string $path ) Computes the key from the specified path.
computePath ( $key )
ensureBucketExists ( ) Ensures the specified bucket exists. If the bucket does not exists and the create option is set to true, it will try to create the bucket. The bucket is created using the same region as the supplied client object.
getOptions ( $key, array $options = [] )

Method Details

__construct() public method

public __construct ( S3Client $service, $bucket, array $options = [], $detectContentType = false )
$service Aws\S3\S3Client
$options array

computeKey() protected method

Computes the key from the specified path.
protected computeKey ( string $path )
$path string return string

computePath() protected method

protected computePath ( $key )

delete() public method

public delete ( $key )

ensureBucketExists() protected method

Ensures the specified bucket exists. If the bucket does not exists and the create option is set to true, it will try to create the bucket. The bucket is created using the same region as the supplied client object.
protected ensureBucketExists ( )

exists() public method

public exists ( $key )

getMetadata() public method

public getMetadata ( $key )

getOptions() protected method

protected getOptions ( $key, array $options = [] )
$options array

getUrl() public method

Gets the publicly accessible URL of an Amazon S3 object.
public getUrl ( string $key, array $options = [] ) : string
$key string Object key
$options array Associative array of options used to buld the URL - expires: The time at which the URL should expire represented as a UNIX timestamp - Any options available in the Amazon S3 GetObject operation may be specified.
return string

isDirectory() public method

public isDirectory ( $key )

keys() public method

public keys ( )

listKeys() public method

public listKeys ( $prefix = '' )

mtime() public method

public mtime ( $key )

read() public method

public read ( $key )

rename() public method

public rename ( $sourceKey, $targetKey )

setMetadata() public method

public setMetadata ( $key, $metadata )

size() public method

public size ( $key )

write() public method

public write ( $key, $content )

Property Details

$bucket protected_oe property

protected $bucket

$bucketExists protected_oe property

protected $bucketExists

$detectContentType protected_oe property

protected $detectContentType

$metadata protected_oe property

protected $metadata

$options protected_oe property

protected $options

$service protected_oe property

protected $service