BaseApplication
Extends AbstractApplicationJoomla Platform Base Application Class
| property-read JInput |
The application input object |
|---|---|
| since |
3.0.0 |
| package |
Joomla CMS |
Methods
__construct
Class constructor.
__construct(\Joomla\CMS\Input\Input input = null, \Joomla\Registry\Registry config = null) : mixed
| since |
3.0.0 |
|---|
Arguments
- input
\Joomla\CMS\Input\InputAn optional argument to provide dependency injection for the application's input object. If the argument is a \JInput object that object will become the application's input object, otherwise a default input object is created.- config
\Joomla\Registry\RegistryAn optional argument to provide dependency injection for the application's config object. If the argument is a Registry object that object will become the application's config object, otherwise a default config object is created.
Response
mixed
doExecute
Method to run the application routines. Most likely you will want to instantiate a controller and execute it, or perform some sort of task directly.
doExecute() : void
| since |
3.4 |
|---|---|
| deprecated |
4.0 The default concrete implementation of doExecute() will be removed, subclasses will need to provide their own implementation. |
getIdentity
Get the application identity.
getIdentity() : mixed
| since |
3.0.0 |
|---|
Response
mixedA \JUser object or null.
loadDispatcher
Allows the application to load a custom or default dispatcher.
loadDispatcher(\JEventDispatcher dispatcher = null) : \Joomla\CMS\Application\BaseApplication
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.
| since |
3.0.0 |
|---|
Arguments
- dispatcher
\JEventDispatcherAn optional dispatcher object. If omitted, the factory dispatcher is created.
Response
\Joomla\CMS\Application\BaseApplicationThis method is chainable.
loadIdentity
Allows the application to load a custom or default identity.
loadIdentity(\JUser identity = null) : \Joomla\CMS\Application\BaseApplication
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.
| since |
3.0.0 |
|---|
Arguments
- identity
\JUserAn optional identity object. If omitted, the factory user is created.
Response
\Joomla\CMS\Application\BaseApplicationThis method is chainable.
registerEvent
Registers a handler to a particular event group.
registerEvent(string event, callable handler) : \Joomla\CMS\Application\BaseApplication
| since |
3.0.0 |
|---|
Arguments
- event
stringThe event name.- handler
callableThe handler, a function or an instance of an event object.
Response
\Joomla\CMS\Application\BaseApplicationThe application to allow chaining.
triggerEvent
Calls all handlers associated with an event group.
triggerEvent(string event, array args = null) : array
| since |
3.0.0 |
|---|
Arguments
- event
stringThe event name.- args
arrayAn array of arguments (optional).
Response
arrayAn array of results from each function call, or null if no dispatcher is defined.
Properties
dispatcher
The application dispatcher object.
| since |
3.0.0 |
|---|
Type(s)
\JEventDispatcher
identity
The application identity object.
| since |
3.0.0 |
|---|
Type(s)
\JUser
input
The application input object
Type(s)
\JInput