joomla/event
Joomla Event provides the building blocks for PHP event systems, including a dispatcher implementation with prioritized listeners. Use it to define, register, and trigger events in a clean, decoupled way. Requires PHP 8.1+.
joomla/console IntegrationThe Event package can be integrated with an application using the joomla/console package to provide additional helpers in your application.
The debug:event-dispatcher command can be used to list information about your application's event dispatcher, including the events which are subscribed to and the listeners for those events. Instantiating this command requires the dispatcher to be provided.
<?php
// /path/to/console.php
use Joomla\Console\Application;
use Joomla\Event\Command\DebugEventDispatcherCommand;
use Joomla\Event\Dispatcher;
$application = new Application;
$dispatcher = new Dispatcher;
$command = new DebugEventDispatcherCommand($dispatcher);
$application->addCommand($command);
$application->execute();
php /path/to/console.php debug:event-dispatcher
The command can be filtered to list information about a single event by providing the event name as an argument.
# This will filter for the Joomla\Application\ApplicationEvents::BEFORE_EXECUTE event
php /path/to/console.php debug:event-dispatcher application.before_execute
How can I help you explore Laravel packages today?