Attribute
2 years ago
CI
2 years ago
Command
2 years ago
CommandLoader
2 years ago
Completion
2 years ago
DependencyInjection
2 years ago
Descriptor
2 years ago
Event
2 years ago
EventListener
2 years ago
Exception
2 years ago
Formatter
2 years ago
Helper
2 years ago
Input
2 years ago
Logger
2 years ago
Output
2 years ago
Question
2 years ago
Resources
2 years ago
SignalRegistry
2 years ago
Style
2 years ago
Tester
2 years ago
Application.php
2 years ago
Color.php
2 years ago
ConsoleEvents.php
2 years ago
Cursor.php
2 years ago
SingleCommandApplication.php
2 years ago
Terminal.php
2 years ago
ConsoleEvents.php
63 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace IAWP_SCOPED\Symfony\Component\Console; |
| 12 | |
| 13 | use IAWP_SCOPED\Symfony\Component\Console\Event\ConsoleCommandEvent; |
| 14 | use IAWP_SCOPED\Symfony\Component\Console\Event\ConsoleErrorEvent; |
| 15 | use IAWP_SCOPED\Symfony\Component\Console\Event\ConsoleSignalEvent; |
| 16 | use IAWP_SCOPED\Symfony\Component\Console\Event\ConsoleTerminateEvent; |
| 17 | /** |
| 18 | * Contains all events dispatched by an Application. |
| 19 | * |
| 20 | * @author Francesco Levorato <git@flevour.net> |
| 21 | * @internal |
| 22 | */ |
| 23 | final class ConsoleEvents |
| 24 | { |
| 25 | /** |
| 26 | * The COMMAND event allows you to attach listeners before any command is |
| 27 | * executed by the console. It also allows you to modify the command, input and output |
| 28 | * before they are handed to the command. |
| 29 | * |
| 30 | * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") |
| 31 | */ |
| 32 | public const COMMAND = 'console.command'; |
| 33 | /** |
| 34 | * The SIGNAL event allows you to perform some actions |
| 35 | * after the command execution was interrupted. |
| 36 | * |
| 37 | * @Event("Symfony\Component\Console\Event\ConsoleSignalEvent") |
| 38 | */ |
| 39 | public const SIGNAL = 'console.signal'; |
| 40 | /** |
| 41 | * The TERMINATE event allows you to attach listeners after a command is |
| 42 | * executed by the console. |
| 43 | * |
| 44 | * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") |
| 45 | */ |
| 46 | public const TERMINATE = 'console.terminate'; |
| 47 | /** |
| 48 | * The ERROR event occurs when an uncaught exception or error appears. |
| 49 | * |
| 50 | * This event allows you to deal with the exception/error or |
| 51 | * to modify the thrown exception. |
| 52 | * |
| 53 | * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") |
| 54 | */ |
| 55 | public const ERROR = 'console.error'; |
| 56 | /** |
| 57 | * Event aliases. |
| 58 | * |
| 59 | * These aliases can be consumed by RegisterListenersPass. |
| 60 | */ |
| 61 | public const ALIASES = [ConsoleCommandEvent::class => self::COMMAND, ConsoleErrorEvent::class => self::ERROR, ConsoleSignalEvent::class => self::SIGNAL, ConsoleTerminateEvent::class => self::TERMINATE]; |
| 62 | } |
| 63 |