Joomla! Platform 12.1

 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)

Class JObject   (Subpackage Object)
Direct descendents
Class Description
ClassJCache Joomla! Cache base object
ClassJLanguage Languages/translation handler class
Abstract classJTable Abstract Table class
ClassJPagination Pagination Class. Provides a common interface for content pagination for the Joomla! Platform.
ClassJPaginationObject Pagination object representing a particular item in the pagination lists.
ClassJEditor JEditor class to handle WYSIWYG editors
ClassJDocument Document class, provides an easy interface to parse and display a document
ClassJUpdate Update class.
ClassJRouter Class to create and parse routes
Abstract classJApplicationBase Joomla Platform Base Application Class
ClassJAuthentication Authentication class, provides an interface for the Joomla authentication system
ClassJAuthenticationResponse Authentication response class, provides an object for storing user and error details
ClassJUser User class. Handles all application interaction with a user
ClassJStream Joomla! Stream Interface
Abstract classJEvent JEvent Class
ClassJEventDispatcher Class to handle dispatching of events.
ClassJExtension Extension object
ClassJLibraryManifest Joomla! Library Manifest File
ClassJPackageManifest Joomla! Package Manifest File
ClassJSession Class for managing HTTP sessions
Abstract classJSessionStorage Custom session storage handler for PHP
ClassJAdapterInstance Adapter Instance Class
Abstract classJObserver Abstract observer class to implement the observer design pattern
ClassJObservable Abstract observable class to implement the observer design pattern
ClassJAdapter Adapter Class Retains common adapter pattern functions Class harvested from joomla.installer.installer
Variable Summary
Variable array $_errors
Method Summary
Constructor JObject __construct ([mixed $properties = null])
Method mixed def (string $property, [mixed $default = null])
Method mixed get (string $property, [mixed $default = null])
Method string getError ([integer $i = null], [boolean $toString = true])
Method array getErrors ()
Method array getProperties ([boolean $public = true])
Method mixed set (string $property, [mixed $value = null])
Method void setError (string $error)
Method boolean setProperties (mixed $properties)
Method 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:
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.

Redefined in descendants as:
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.

Redefined in descendants as:
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 ()
/html>