0 follower

Final Class Yiisoft\Yii\Console\SymfonyEventDispatcher

InheritanceYiisoft\Yii\Console\SymfonyEventDispatcher
ImplementsSymfony\Contracts\EventDispatcher\EventDispatcherInterface

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Yii\Console\SymfonyEventDispatcher
dispatch() Dispatches an event to all registered listeners. Yiisoft\Yii\Console\SymfonyEventDispatcher

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( \Psr\EventDispatcher\EventDispatcherInterface $dispatcher )
$dispatcher \Psr\EventDispatcher\EventDispatcherInterface

                public function __construct(private PsrEventDispatcherInterface $dispatcher)
{
}

            
dispatch() public method

Dispatches an event to all registered listeners.

public object dispatch ( object $event, string|null $eventName null )
$event object
$eventName string|null

                public function dispatch(object $event, ?string $eventName = null): object
{
    /** @psalm-var T */
    return $this->dispatcher->dispatch($event);
}