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