Class JObject

Description

Joomla Platform Object Class

This class allows for simple but smart objects with get and set methods and an internal error handler.

  • since: 11.1

Located in /libraries/joomla/object/object.php (line 22)


	
			
Direct descendents
Class Description
 class JSite Mock JSite class used to fool the frontend search plugins because they route the results.
 class JAdminCssMenu Tree based class to render the admin menu
 class JMenuNode A Node for JAdminCssMenu
Abstract class JCaptcha Joomla! Captcha base object
 class JEditor JEditor class to handle WYSIWYG editors
 class JInstallerExtension Extension object
 class FOFController FrameworkOnFramework controller class. FOF is based on the thin controller paradigm, where the controller is mainly used to set up the model state and spawn the view.
 class FOFDispatcher FrameworkOnFramework dispatcher class
 class FOFModel FrameworkOnFramework Model class. The Model is the worhorse. It performs all
 class FOFTable FrameworkOnFramework Table class. The Table is one part controller, one part model and one part data adapter. It's supposed to handle operations for single records.
Abstract class FOFView FrameworkOnFramework View class. The View is the MVC component which gets the raw data from a Model and renders it in a way that makes sense. The usual rendering is HTML, but you can also output JSON, CSV, XML, or even media (images, videos, ...) and documents (Word, PDF, Excel...).
 class JAdapter Adapter Class Retains common adapter pattern functions Class harvested from joomla.installer.installer
 class JAdapterInstance Adapter Instance Class
 class JEventDispatcher Class to handle dispatching of events.
Abstract class JEvent JEvent Class
 class JStream Joomla! Stream Interface
Abstract class JTable Abstract Table class
 class JUpdate Update class.
 class JAuthentication Authentication class, provides an interface for the Joomla authentication system
 class JUser User class. Handles all application interaction with a user
 class JNode Tree Node Class.
 class JObservable Abstract observable class to implement the observer design pattern
Abstract class JObserver Abstract observer class to implement the observer design pattern
 class JTree Tree Class.
 class JCategoryNode Helper class to load Categorytree
 class JControllerLegacy Base class for a Joomla Controller
Abstract class JModelLegacy Base class for a Joomla Model
 class JViewLegacy Base class for a Joomla View
Variable Summary
 array $_errors
Method Summary
 JObject __construct ([mixed $properties = null])
 mixed def (string $property, [mixed $default = null])
 mixed get (string $property, [mixed $default = null])
 string getError ([integer $i = null], [boolean $toString = true])
 array getErrors ()
 array getProperties ([boolean $public = true])
 mixed set (string $property, [mixed $value = null])
 void setError (string $error)
 boolean setProperties (mixed $properties)
 string __toString ()
Variables
array $_errors = array() (line 32)

An array of error messages or Exception objects.

  • see: JError
  • deprecated: 12.3 JError has been deprecated
  • since: 11.1
  • access: protected
Methods
Constructor __construct (line 42)

Class constructor, overridden in descendant classes.

  • since: 11.1
  • access: public
JObject __construct ([mixed $properties = null])
  • mixed $properties: Either and associative array or another object to set the initial properties of the object.

Redefined in descendants as:
def (line 73)

Sets a default value if not alreay assigned

  • since: 11.1
  • access: public
mixed def (string $property, [mixed $default = null])
  • string $property: The name of the property.
  • mixed $default: The default value.
get (line 91)

Returns a property of the object or the default value if the property is not set.

mixed get (string $property, [mixed $default = null])
  • string $property: The name of the property.
  • mixed $default: The default value.

Redefined in descendants as:
  • FOFView::get() : Method to get data from a registered model or a property of the view
  • JViewLegacy::get() : Method to get data from a registered model or a property of the view
getError (line 140)

Get the most recent error message.

  • return: Error message
  • see: JError
  • deprecated: 12.3 JError has been deprecated
  • since: 11.1
  • access: public
string getError ([integer $i = null], [boolean $toString = true])
  • integer $i: Option error index.
  • boolean $toString: Indicates if JError objects should return their error message.
getErrors (line 176)

Return all errors, if any.

  • return: Array of error messages or JErrors.
  • see: JError
  • deprecated: 12.3 JError has been deprecated
  • since: 11.1
  • access: public
array getErrors ()
getProperties (line 111)

Returns an associative array of object properties.

array getProperties ([boolean $public = true])
  • boolean $public: If true, returns only the public properties.
set (line 191)

Modifies a property of the object, creating it if it does not already exist.

  • return: Previous value of the property.
  • since: 11.1
  • access: public
mixed set (string $property, [mixed $value = null])
  • string $property: The name of the property.
  • mixed $value: The value of the property to set.
setError (line 235)

Add an error message.

  • see: JError
  • deprecated: 12.3 JError has been deprecated
  • since: 11.1
  • access: public
void setError (string $error)
  • string $error: Error message.
setProperties (line 209)

Set the object properties based on a named array/hash.

boolean setProperties (mixed $properties)
  • mixed $properties: Either an associative array or another object.
__toString (line 58)

Magic method to convert the object to a string gracefully.

  • return: The classname.
  • deprecated: 12.3 Classes should provide their own __toString() implementation.
  • since: 11.1
  • access: public
string __toString ()

Documentation generated on Tue, 19 Nov 2013 15:09:44 +0100 by phpDocumentor 1.4.3