Abstract Class JApplicationBase

Description

Joomla Platform Base Application Class

  • abstract:
  • since: 12.1

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


	
			
Direct descendents
Class Description
 class JApplicationCli Base class for a Joomla! command line application.
 class JApplicationWeb Base class for a Joomla! Web application.
 class JApplication Base class for a Joomla! application.
Variable Summary
Method Summary
 void close ([integer $code = 0])
 mixed getIdentity ()
 JApplicationBase loadIdentity ([JUser $identity = null])
 JApplicationBase registerEvent (string $event, callable $handler)
 array triggerEvent (string $event, [array $args = null])
Variables
JEventDispatcher $dispatcher (line 27)

The application dispatcher object.

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

The application identity object.

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

The application input object.

  • since: 12.1
  • access: public
Methods
close (line 55)

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 67)

Get the application identity.

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

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 ([JEventDispatcher $dispatcher = null])
  • JEventDispatcher $dispatcher: An optional dispatcher object. If omitted, the factory dispatcher is created.
loadIdentity (line 145)

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 82)

Registers a handler to a particular event group.

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

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).

Documentation generated on Tue, 19 Nov 2013 14:54:26 +0100 by phpDocumentor 1.4.3