CMSObject
class CMSObject
Joomla Platform Object Class
This class allows for simple but smart objects with get and set methods and an internal error handler.
Methods
__construct(
mixed $properties = null)
Class constructor, overridden in descendant classes.
string
__toString()
Magic method to convert the object to a string gracefully.
mixed
def(
string $property,
mixed $default = null)
Sets a default value if not already assigned
mixed
get(
string $property,
mixed $default = null)
Returns a property of the object or the default value if the property is not set.
array
getProperties(
boolean $public = true)
Returns an associative array of object properties.
string
getError(
integer $i = null,
boolean $toString = true)
Get the most recent error message.
array
getErrors()
Return all errors, if any.
mixed
set(
string $property,
mixed $value = null)
Modifies a property of the object, creating it if it does not already exist.
boolean
setProperties(
mixed $properties)
Set the object properties based on a named array/hash.
void
setError(
string $error)
Add an error message.