RunCommandMessage.php 941 B

123456789101112131415161718192021222324252627282930313233343536
  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\Messenger;
  11. use Symfony\Component\Console\Exception\RunCommandFailedException;
  12. /**
  13. * @author Kevin Bond <kevinbond@gmail.com>
  14. */
  15. class RunCommandMessage implements \Stringable
  16. {
  17. /**
  18. * @param bool $throwOnFailure If the command has a non-zero exit code, throw {@see RunCommandFailedException}
  19. * @param bool $catchExceptions @see Application::setCatchExceptions()
  20. */
  21. public function __construct(
  22. public readonly string $input,
  23. public readonly bool $throwOnFailure = true,
  24. public readonly bool $catchExceptions = false,
  25. ) {
  26. }
  27. public function __toString(): string
  28. {
  29. return $this->input;
  30. }
  31. }