Final Class Yiisoft\Yii\Console\SymfonyEventDispatcher
| Inheritance | Yiisoft\Yii\Console\SymfonyEventDispatcher |
|---|---|
| Implements | Symfony\Contracts\EventDispatcher\EventDispatcherInterface |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Yii\Console\SymfonyEventDispatcher | |
| dispatch() | Dispatches an event to all registered listeners. | Yiisoft\Yii\Console\SymfonyEventDispatcher |
Method Details
| public mixed __construct ( \Psr\EventDispatcher\EventDispatcherInterface $dispatcher ) | ||
| $dispatcher | \Psr\EventDispatcher\EventDispatcherInterface | |
public function __construct(private PsrEventDispatcherInterface $dispatcher)
{
}
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);
}
Signup or Login in order to comment.