ConsoleEvents.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Console;
  11. /**
  12. * Contains all events dispatched by an Application.
  13. *
  14. * @author Francesco Levorato <git@flevour.net>
  15. */
  16. final class ConsoleEvents
  17. {
  18. /**
  19. * The COMMAND event allows you to attach listeners before any command is
  20. * executed by the console. It also allows you to modify the command, input and output
  21. * before they are handled to the command.
  22. *
  23. * The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent
  24. * instance.
  25. *
  26. * @Event
  27. *
  28. * @var string
  29. */
  30. const COMMAND = 'console.command';
  31. /**
  32. * The TERMINATE event allows you to attach listeners after a command is
  33. * executed by the console.
  34. *
  35. * The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent
  36. * instance.
  37. *
  38. * @Event
  39. *
  40. * @var string
  41. */
  42. const TERMINATE = 'console.terminate';
  43. /**
  44. * The EXCEPTION event occurs when an uncaught exception appears.
  45. *
  46. * This event allows you to deal with the exception or
  47. * to modify the thrown exception. The event listener method receives
  48. * a Symfony\Component\Console\Event\ConsoleExceptionEvent
  49. * instance.
  50. *
  51. * @Event
  52. *
  53. * @var string
  54. */
  55. const EXCEPTION = 'console.exception';
  56. }