interface StorageInterface (View source)

Interface for a resource storage

Methods

string
getName()

Returns the instance name of this storage

resource|false
getStreamByResource(PersistentResource $resource)

Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.

resource|false
getStreamByResourcePath(string $relativePath)

Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.

StorageObject>
getObjects()

Retrieve all Objects stored in this storage.

StorageObject>
getObjectsByCollection(CollectionInterface $collection)

Retrieve all Objects stored in this storage, filtered by the given collection name

Details

string getName()

Returns the instance name of this storage

Return Value

string

resource|false getStreamByResource(PersistentResource $resource)

Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.

Parameters

PersistentResource $resource

The resource stored in this storage

Return Value

resource|false

The resource stream or false if the stream could not be obtained

resource|false getStreamByResourcePath(string $relativePath)

Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.

Parameters

string $relativePath

A path relative to the storage root, for example "MyFirstDirectory/SecondDirectory/Foo.css"

Return Value

resource|false

A URI (for example the full path and filename) leading to the resource file or false if it does not exist

StorageObject> getObjects()

Retrieve all Objects stored in this storage.

Return Value

StorageObject>

StorageObject> getObjectsByCollection(CollectionInterface $collection)

Retrieve all Objects stored in this storage, filtered by the given collection name

Parameters

CollectionInterface $collection

Return Value

StorageObject>