Back to Joomla project (class list)

Class EventAware - list of methods

Trait for application classes which dispatch events
Package: Joomla\CMS\Application
Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE
Located at: Joomla/Application/EventAware.php
Project: Joomla

Method Summary

public \Joomla\Event\DispatcherInterface
()

Get the event dispatcher.
Returns
  • \Joomla\Event\DispatcherInterface
Since
  • 4.0.0
-
  • \UnexpectedValueException May be thrown if the dispatcher has not been set.
Show source code of this method: getDispatcher Source Code

public \Psr\Log\LoggerInterface
()

Get the logger.
Returns
  • \Psr\Log\LoggerInterface
Since
  • 4.0.0
Show source code of this method: getLogger Source Code

public $this
(mixed $event, callable $handler)

Registers a handler to a particular event group.
Parameters
  • string $event The event name.
  • callable $handler The handler, a function or an instance of an event object.
Returns
  • $this
Since
  • 4.0.0
Show source code of this method: registerEvent Source Code

public array
(mixed $eventName, mixed $args = [])

Calls all handlers associated with an event group.
Parameters
  • string $eventName The event name.
  • array|\Joomla\Event\Event $args An array of arguments or an Event object (optional).
Returns
  • array An array of results from each function call. Note this will be an empty array if no dispatcher is set.
Since
  • 4.0.0
Deprecated
  • 5.0
-
  • \InvalidArgumentException
Show source code of this method: triggerEvent Source Code

Tags Summary

Since
4.0.0