\RawContentReader
Simple wrapper around raw content items
Use this if you're wanting to write some raw text, eg
$writer->write(new RawContentReader('raw text'));
- Author: marcus@symbiote.com.au
- License: BSD License http://silverstripe.org/bsd-license/
Synopsis
class RawContentReader
extends ContentReader
{
- // members
- protected $raw;
- // Inherited members from ReaderWriterBase
- protected sets $sourceIdentifier;
- protected $id;
- // methods
- public void __construct()
- public void read()
- public string getURL()
- public void exists()
- // Inherited methods from ContentReader
- public ContentWriter getWriter()
- public boolean isReadable()
- public boolean isListable()
- public array getList()
- public abstract void exists()
- public abstract string getURL()
- public abstract string read()
- public array() getInfo()
- // 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 - $raw
- $sourceIdentifier — sets
Methods
public
- __construct()
- exists()
- getURL() — Never link to raw content
- read()
Inherited from ContentReader
public
- exists() — Does the item exist or not?
- getInfo() — Return metadata about this file, if applicable.
- getList() — Returns a list (array) of 'child' items of this ContentReader. The items contained in the listing are ContentReader items
- getURL() — Get a url to this piece of content
- getWriter() — Returns a content writer wrapped around the same raw item
- isListable() — Is this listable? If so, the getList() method must return an array of ContentReader items that are the 'listed' items from this content reader.
- isReadable() — Can content be read from the item pointed at by the content ID this object wraps around?
- read() — Read this content as a string
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()