mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-21 19:16:23 +00:00
657 B
657 B
date | id | title |
---|---|---|
2020-11-17 | 03320caf-dc21-416f-9d74-dc1bc219101e | ConsoleEvents::SIGNAL |
Description
Event to handle application command signals.
Syntax
// ...
use Symfony\Component\Console\Event\ConsoleSignalEvent;
class SignalSubscriber implements EventSubscriberInterface
{
// ...
public function handleSignal(ConsoleSignalEvent $event)
{
$signal = $event->getHandlingSignal();
// ...
}
public static function getSubscribedEvents()
{
return [
ConsoleEvents::SIGNAL => 'handleSignal',
];
}
}