Omeka_Storage_Adapter_AdapterInterface

class Omeka_Storage_Adapter_AdapterInterface

Package: Storage\Adapter

Interface for file storage adapters.

Classes that implement this interface handle the actual work ofstoring andretrieving files.

__construct(array $options)

Set options for the storage adapter.

Parameters:
  • $options (array) –
setUp()

Follow any necessary steps to set up storage prior to use.

E.g. for the filesystem adapter, this would include creating anydirectories that did not already exist. For S3, it might involvecreating a new bucket if it did not exist.

canStore()

Check whether the adapter is set up correctly to be able to store files.

Returns:boolean
store(string $source, string $dest)

Move a local file to “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 storage path.
  • $dest (string) – Destination storage 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