Omeka_Storage_Adapter_ZendS3¶
- class Omeka_Storage_Adapter_ZendS3¶
Package: Storage\Adapter
Cloud storage adapter for Amazon S3, using Zend’s built-in service.
Caveat: Zend’s storage adapter currently does not function correctlywith buckets that are validly-named, but use characters that cannotappear in domain names.
- property _s3¶
- property _options¶
- __construct(array $options = Array)¶
Set options for the storage adapter.
Parameters: - $options (array) –
- setUp()¶
- canStore()¶
- store(string $source, string $dest)¶
Move a local file to S3 storage.
Parameters: - $source (string) – Local filesystem path to file.
- $dest (string) – Destination path.
- move(string $source, string $dest)¶
Move a file between two “storage” locations.
Parameters: - $source (string) – Original stored path.
- $dest (string) – Destination stored path.
- delete(string $path)¶
Remove a “stored” file.
Parameters: - $path (string) –
- getUri(string $path)¶
Get a URI for a “stored” file.
Parameters: - $path (string) –
Returns: string URI
- _getBucketName()¶
Get the name of the bucket files should be stored in.
Returns: string Bucket name
- _getObjectName(string $path)¶
Get the object name. Zend’s S3 service requires you to build the object name by prepending the name of the target bucket.
Parameters: - $path (string) –
Returns: string Object name.
- _getExpiration()¶
Normalizes and returns the expiration time.
Converts to integer and returns zero for all non-positive numbers.
Returns: int