CollectionInterface
interface CollectionInterface (View source)
Interface for a resource collection
Methods
Returns the name of this collection
Returns the storage used for this collection
Returns the publication target defined for this collection
Imports a resource (file) from the given URI or PHP resource stream into this collection.
Imports a resource from the given string content into this collection.
Publishes the whole collection to the corresponding publishing target
Returns all internal data objects of the storage attached to this collection.
Returns a stream handle of the given persistent resource which allows for opening / copying the resource's data. Note that this stream handle may only be used read-only.
Details
string
getName()
Returns the name of this collection
StorageInterface
getStorage()
Returns the storage used for this collection
TargetInterface
getTarget()
Returns the publication target defined for this collection
PersistentResource
importResource(string|resource $source)
Imports a resource (file) from the given URI or PHP resource stream into this collection.
On a successful import this method returns a PersistentResource object representing the newly imported persistent resource.
Note that this collection must have a writable storage in order to import resources.
PersistentResource
importResourceFromContent(string $content)
Imports a resource from the given string content into this collection.
On a successful import this method returns a PersistentResource object representing the newly imported persistent resource.
Note that this collection must have a writable storage in order to import resources.
void
publish()
Publishes the whole collection to the corresponding publishing target
StorageObject>
getObjects()
Returns all internal data objects of the storage attached to this collection.
resource|false
getStreamByResource(PersistentResource $resource)
Returns a stream handle of the given persistent resource which allows for opening / copying the resource's data. Note that this stream handle may only be used read-only.