Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de l'espace de nommage Joomla\CMS\Application

Espaces de nommage

 CLI
 
 Exception
 

Structures de données

class  AdministratorApplication
 
class  ApiApplication
 
class  ApplicationHelper
 
class  BaseApplication
 
class  CliApplication
 
class  CMSApplication
 
interface  CMSApplicationInterface
 
interface  CMSWebApplicationInterface
 
class  ConsoleApplication
 
class  DaemonApplication
 
interface  EventAwareInterface
 
class  SiteApplication
 
class  WebApplication
 

Fonctions

 getDispatcher ()
 
 getLogger ()
 
 registerEvent ($event, callable $handler)
 
 triggerEvent ($eventName, $args=[])
 
 getIdentity ()
 
 loadIdentity (User $identity=null)
 
 setUserFactory (UserFactoryInterface $userFactory)
 

Variables

trait EventAware
 
trait IdentityAware
 
 $userFactory
 

Description détaillée

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Joomla! Content Management System

Documentation des fonctions

◆ getDispatcher()

◆ getIdentity()

◆ getLogger()

Joomla\CMS\Application\getLogger ( )
abstract

◆ loadIdentity()

Joomla\CMS\Application\loadIdentity ( User  $identity = null)

Allows the application to load a custom or default identity.

Paramètres
User$identityAn optional identity object. If omitted, a null user object is created.
Renvoie
$this
Depuis
4.0.0

Références $this.

Référencé par WebApplication\afterSessionStart().

◆ registerEvent()

Joomla\CMS\Application\registerEvent (   $event,
callable  $handler 
)

Registers a handler to a particular event group.

Paramètres
string$eventThe event name.
callable$handlerThe handler, a function or an instance of an event object.
Renvoie
$this
Depuis
4.0.0

Références $this, et Joomla\CMS\Application\getDispatcher().

◆ setUserFactory()

Joomla\CMS\Application\setUserFactory ( UserFactoryInterface  $userFactory)

Set the user factory to use.

Paramètres
UserFactoryInterface$userFactoryThe user factory to use
Renvoie
void
Depuis
4.0.0

Références Joomla\CMS\Application\$userFactory.

◆ triggerEvent()

Joomla\CMS\Application\triggerEvent (   $eventName,
  $args = [] 
)

Calls all handlers associated with an event group.

This is a legacy method, implementing old-style (Joomla! 3.x) plugin calls. It's best to go directly through the Dispatcher and handle the returned EventInterface object instead of going through this method. This method is deprecated and will be removed in Joomla! 5.x.

This method will only return the 'result' argument of the event

Paramètres
string$eventNameThe event name.
array | Event$argsAn array of arguments or an Event object (optional).
Renvoie
array An array of results from each function call. Note this will be an empty array if no dispatcher is set.
Depuis
4.0.0
Exceptions

Références $className, $result, $this, elseif, Joomla\CMS\Application\getDispatcher(), Joomla\CMS\Event\getEventClassByEventName(), et Joomla\CMS\Application\getLogger().

Référencé par AdministratorApplication\dispatch(), SiteApplication\dispatch(), ApiApplication\dispatch(), WebApplication\execute(), CliApplication\execute(), DaemonApplication\execute(), CMSApplication\initialiseApp(), CMSApplication\login(), CMSApplication\logout(), DaemonApplication\postFork(), CMSApplication\render(), AdministratorApplication\route(), SiteApplication\route(), et CMSApplication\route().

Documentation des variables

◆ $userFactory

◆ EventAware

trait EventAware
Valeur initiale :

Trait for application classes which dispatch events

Depuis
4.0.0

◆ IdentityAware

trait IdentityAware
Valeur initiale :
{
protected $identity

Trait for application classes which are identity (user) aware

Depuis
4.0.0