ConsoleEvents.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
  24. */
  25. const COMMAND = 'console.command';
  26. /**
  27. * The TERMINATE event allows you to attach listeners after a command is
  28. * executed by the console.
  29. *
  30. * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent")
  31. */
  32. const TERMINATE = 'console.terminate';
  33. /**
  34. * The ERROR event occurs when an uncaught exception or error appears.
  35. *
  36. * This event allows you to deal with the exception/error or
  37. * to modify the thrown exception.
  38. *
  39. * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
  40. */
  41. const ERROR = 'console.error';
  42. }