Omeka_Storage_Adapter_AdapterInterface

Package: Storage\Adapter

interface Omeka_Storage_Adapter_AdapterInterface

Interface for file storage adapters.

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

__construct($options = array())

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 any directories that did not already exist. For S3, it might involve creating a new bucket if it did not exist.

canStore()

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

Returns:

bool

store($source, $dest)

Move a local file to “storage.”

Parameters:
  • $source (string) – Local filesystem path to file.

  • $dest (string) – Destination path.

move($source, $dest)

Move a file between two storage locations.

Parameters:
  • $source (string) – Original storage path.

  • $dest (string) – Destination storage path.

delete($path)

Remove a “stored” file.

Parameters:
  • $path (string) –

getUri($path)

Get a URI for a “stored” file.

Parameters:
  • $path (string) –

Returns:

string URI