Comments: on this page. Click to read or post your own.
Implements interfaces:
Generic class for all data that will be accessed from a view.
View interrogate their controllers to provide them with the data they need. They to this by calling the methods provided by the ViewableData base-class, from which most Sapphire objects are inherited.
ViewableData cover page controls, controllers, and data objects. It's the basic unit of data exchange. More specifically, it's anything that can be put into a view.
If any public method on this class is prefixed with an underscore, the results are cached in memory through cachedCall().
Located in /sapphire/core/ViewableData.php (line 18)
Object | --ViewableData
| Class | Description |
|---|---|
| SSViewerTest_ViewableData | Generic class for all data that will be accessed from a view. |
| RequestHandlingTest_ControllerFailover | Generic class for all data that will be accessed from a view. |
| RSSFeedTest_ItemA | Generic class for all data that will be accessed from a view. |
| RSSFeedTest_ItemB | Generic class for all data that will be accessed from a view. |
| RSSFeedTest_ItemC | Generic class for all data that will be accessed from a view. |
| ModelViewer_Model | Represents a single model in the model viewer |
| ModelViewer_Field | Generic class for all data that will be accessed from a view. |
| ModelViewer_Relation | Generic class for all data that will be accessed from a view. |
| BulkLoader | Generic class for all data that will be accessed from a view. |
| TabularStyle | This is a form decorator (a class that wraps around a form) providing us with some functions to display it in a Tabular style. |
| NestedForm | This is a form decorator that lets you place a form inside another form. |
| TableListField_Item | A single record in a TableListField. |
| HtmlEditorField_control | Base class for HTML editor toolbar buttons. |
| ArrayData | Lets you wrap a bunch of array data into a ViewableData object. |
| ViewableData_Customised | A ViewableData object that has been customised with extra data. Use ViewableData->customise() to create. |
| ViewableData_ObjectCustomised | A ViewableData object that has been customised with an extra object. Use ViewableData->customise() to create. |
| ViewableData_Debugger | Debugger helper. |
| RequestHandler | This class is the base class of any Sapphire object that can be used to handle HTTP requests. |
| DataObject | A single database record & abstract class for the data-access-model. |
| DataObjectSet | This class represents a set of ViewableData subclasses (mostly DataObject or ArrayData). |
| Versioned_Version | Represents a single version of a record. |
| DBField | Single field in the database. |
| Class to support sending emails. | |
| RSSFeed | RSSFeed class |
| RSSFeed_Entry | RSSFeed_Entry class |
| RestfulService | RestfulService class allows you to consume various RESTful APIs. |
| ImprintStats | Generic class for all data that will be accessed from a view. |
| SSReport | Base "abstract" class for all Report classes viewable in the Reports top menu section of CMS. |
| RecipientImportField_Cell | Generic class for all data that will be accessed from a view. |
Object-casting information for class methods
Cache used by castingHelperPair().
Failover object.
The iterator position.
Total number of items in the iterator.
Keep a record of the parent node of this data node.
Keep a record of the parent node of this data node.
A cast of this object's controls in their native format (used by cachedCall)
A cast of this object's controls in object format
A cast of this object's controls in XML-safe format
Inherited from Object
Object::$class
Object::$extensions
Object::$extension_instances
Converts a field spec into an object creator.
For example: "Int" becomes "new Int($fieldName);" and "Varchar(50)" becomes "new Varchar($fieldName, 50);"
Converts a field spec into an object creator pair; this is a map containing className and castingHelper.
See castingObjectCreator for more information.
Return the value of the given field in an XML attribute safe format.
Return the site's absolute base URL, with a slash on the end.
A helper function used by castingHelperPair() to build the cache.
SSViewer's data-access method.
All template calls to ViewableData are fed through this function. It takes care of caching data, and linking up parents to support Menu1_Menu2() syntax for nested data.
Returns the "casting helper" for the given field. A casting helper is a piece of PHP code that, when evaluated, will create an object to represent the value.
Returns the "casting helper" for the given field and the casting class name. A casting helper is a piece of PHP code that, when evaluated, will create an object to represent the value.
The return value is an map containing two values:
Get part of class ancestry for css-class-usage.
Avoids having to subclass just to built templates with new css-classes, and allows for versatile css inheritance and overrides.
<example> <body class="$CSSClasses"> </example>
Returns the currently logged in user.
Returns the current controller
Add some arbitrary data to this viewabledata object. Returns a new object with the merged data.
Return a Debugger object.
This is set up like so that you can put $Debug.Content into your template to get debugging information about $Content.
Define custom methods for this object. Called once per class.
Implements failover and cached methods.
Return the string-format type for the given field.
Returns true if this item is an even item in the container set.
Returns 'even' if this item is an even item in the container set.
Returns 'odd' if this item is an odd item in the container set.
Returns true if this item is the first in the container set.
Returns 'first' if this item is the first in the container set.
Returns 'last' if this item is the last in the container set.
Get a field by it's name. This should be overloaded in child classes.
Returns a "1 record iterator" Views <%control %> tags operate by looping over an item for as many instances as are available. When you stick a single ViewableData object in a control tag, the foreach() loop still needs to work. We do this by creating an iterator that only returns one record.
This will always return the current ViewableData object.
Return a named array of calls to XML_val with different parameters.
Each value in the array is used as the first argument to XML_val. The result is a named array of the return values.
The intended use-case is when converting simple templates to PHP methods to optimise code, as we did in the form classes. If you're calling renderWith more than a few times on a very simple template, this can be useful.
extract(getXMLValues(array('Title','Field','Message'))) // You can now use $Title, $Field, and $Message as you would in a template
Checks if a field exists on this object. This should be overloaded in child classes.
Checks if the current user has the given permission.
Can be used to implement security-specific sections within templates
Returns true if the given method/parameter has a value
If the item is an object, it will use the exists() method to determine existence
Returns wether the current request is triggered by an XMLHTTPRequest object.
Set up the "iterator properties" for this object.
These are properties that give information about where we are in the set.
Return the value of the given field in an JavaScript safe format.
Returns true if this item is the last in the container set.
When rendering some objects it is necessary to iterate over the object being rendered, to do this, you need access to itself.
Returns true if this item is one of the middle items in the container set.
Returns 'middle' if this item is between first and last.
Return the object version of the given field/method.
Returns true if this item is an even item in the container set.
Returns the numerical number of this item in the dataset.
The count starts from $startIndex, which defaults to 1.
Return the value of the given field without any escaping.
Render this data using the given template, and return the result as a string You can pass one of the following:
Returns the Security ID.
This is used to prevent CRSF attacks in forms.
Set a fields value. This should be overloaded in child classes.
Return the value of the given field in an SQL safe format.
Returns the root directory of the theme we're working with.
This can be useful for referencing images within the theme. For example, you might put a reference to <img src="$ThemeDir/images/something.gif"> in your template.
If your image is within a subtheme, such as mytheme_forum, you can set the subtheme parameter. For example, <img src="$ThemeDir(forum)/images/something.gif">
We don't recommend that you use this method when no theme is selected. That is, we recommend that you only put $ThemeDir into your theme templates. However, if no theme is selected, this will be the project folder/
Return the total number of "sibling" items in the dataset.
Return the value (non-object) version of the given field/method.
Returns the value of the given field / method in an XML-safe format.
Accessor overloader.
Allows default getting of fields via $this->getVal(), or mediation via a getParamName() method.
Is-set overloader.
Will check to see if the given field exists on this object. Calls the hasField() method, as well as checking failover classes.
Setter overloader.
Allows default setting of fields in $this->setValue(), or mediation via a getParamName() method.
Inherited From Object
Object::__construct()
Object::addMethodsFrom()
Object::addStaticVars()
Object::addWrapperMethod()
Object::add_extension()
Object::add_static_var()
Object::allMethodNames()
Object::buildMethodList()
Object::cacheToFile()
Object::cacheToFileWithArgs()
Object::clearCache()
Object::combined_static()
Object::create()
Object::createMethod()
Object::defineMethods()
Object::exists()
Object::extend()
Object::extInstance()
Object::getCustomClass()
Object::get_static()
Object::hasExtension()
Object::hasMethod()
Object::has_extension()
Object::invokeWithExtensions()
Object::is_a()
Object::loadCache()
Object::parentClass()
Object::remove_extension()
Object::sanitiseCachename()
Object::saveCache()
Object::set_stat()
Object::set_static()
Object::set_uninherited()
Object::stat()
Object::strong_create()
Object::uninherited()
Object::uninherited_static()
Object::useCustomClass()
Object::__call()
Object::__toString()
Documentation generated on Mon, 23 Mar 2009 06:58:51 +1300 by phpDocumentor 1.3.2