Class JApplicationBase

Description

Joomla Platform Base Application Class

  • abstract:
  • since: 12.1

Located in /libraries/joomla/application/base.php (line 22)

JObject
   |
   --JApplicationBase
Variable Summary
Method Summary
void close ([integer $code = 0])
mixed getIdentity ()
JApplicationBase loadDispatcher ([JDispatcher $dispatcher = null])
JApplicationBase loadIdentity ([JUser $identity = null])
JApplicationBase registerEvent (string $event, callback $handler)
array triggerEvent (string $event, [array $args = null])
Variables
JEventDispatcher $dispatcher (line 30)

The application dispatcher object.

  • since: 12.1
  • access: protected
JUser $identity (line 38)

The application identity object.

  • since: 12.1
  • access: protected
JInput $input = null (line 46)

The application input object.

  • since: 12.1
  • access: public

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
close (line 58)

Method to close the application.

  • since: 12.1
  • access: public
void close ([integer $code = 0])
  • integer $code: The exit code (optional; default is 0).
getIdentity (line 70)

Get the application identity.

  • return: A JUser object or null.
  • since: 12.1
  • access: public
mixed getIdentity ()
loadDispatcher (line 128)

Allows the application to load a custom or default dispatcher.

The logic and options for creating this object are adequately generic for default cases but for many applications it will make sense to override this method and create event dispatchers, if required, based on more specific needs.

  • return: This method is chainable.
  • since: 12.1
  • access: public
JApplicationBase loadDispatcher ([JDispatcher $dispatcher = null])
  • JDispatcher $dispatcher: An optional dispatcher object. If omitted, the factory dispatcher is created.
loadIdentity (line 148)

Allows the application to load a custom or default identity.

The logic and options for creating this object are adequately generic for default cases but for many applications it will make sense to override this method and create an identity, if required, based on more specific needs.

  • return: This method is chainable.
  • since: 12.1
  • access: public
JApplicationBase loadIdentity ([JUser $identity = null])
  • JUser $identity: An optional identity object. If omitted, the factory user is created.
registerEvent (line 85)

Registers a handler to a particular event group.

  • return: The application to allow chaining.
  • since: 12.1
  • access: public
JApplicationBase registerEvent (string $event, callback $handler)
  • string $event: The event name.
  • callback $handler: The handler, a function or an instance of a event object.
triggerEvent (line 105)

Calls all handlers associated with an event group.

  • return: An array of results from each function call, or null if no dispatcher is defined.
  • since: 12.1
  • access: public
array triggerEvent (string $event, [array $args = null])
  • string $event: The event name.
  • array $args: An array of arguments (optional).

Inherited Methods

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:52:37 -0500 by phpDocumentor 1.4.4