\FileContentWriter
A content writer that writes data to disk
- Author: marcus@symbiote.com.au
- License: BSD License http://silverstripe.org/bsd-license/
Synopsis
class FileContentWriter
extends ContentWriter
{
- // members
- public string $basePath = 'content';
- // Inherited members from ContentWriter
- protected ContentReader $reader;
- protected resource|filename|ContentReader $source;
- // Inherited members from ReaderWriterBase
- protected sets $sourceIdentifier;
- protected $id;
- // methods
- public void nameToId()
- public void write()
- protected void getTarget()
- protected void getFilesystemName()
- public void delete()
- // Inherited methods from ContentWriter
- public void __construct()
- public void getReader()
- public void setSource()
- protected void getReaderWrapper()
- public string nameToId()
- public abstract void write()
- public abstract void delete()
- // Inherited methods from ReaderWriterBase
- public void __construct()
- public void setSourceIdentifier()
- public void getSourceIdentifier()
- public mixed getId()
- public void setId()
- public void getContentId()
- public ContentReader providerOfUrl()
Hierarchy
Extends
Members
protected
- $id
—
string
The actual unique id that represents this content - $reader
—
ContentReader
A possibly set reader object that wraps around the content this writer will also be writing to - $source
—
resource|filename|ContentReader
Where the content this writer will write is coming from - $sourceIdentifier — sets
public
- $basePath
—
string
Where should file assets be written to initially?
Methods
protected
public
Inherited from ContentWriter
protected
- getReaderWrapper() — Get content reader wrapper around a given piece of content
public
- delete() — Delete the item represented by this writer
- getReader() — Get a content reader that can read the underlying content item
- nameToId() — Convert a name to an ID that a content reader would use to refer to that content.
- setSource() — Sets the source of the content that this writer will eventually write out.
- write() — Write content to storage
Inherited from ReaderWriterBase
public
- getContentId() — Get content identifier that can be used to retrieve this content at a later point in timer
- getId() — Gets the underlying id if this item
- getSourceIdentifier() — A signature for this content store. For example, filesystem might return
- providerOfUrl() — Could this reader/writer be the source for the passed in URL?
- setId() — Allow external code to focerfully change where we're accessing this content from
- setSourceIdentifier()