OutputStyle.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. namespace Illuminate\Console;
  3. use Symfony\Component\Console\Style\SymfonyStyle;
  4. use Symfony\Component\Console\Input\InputInterface;
  5. use Symfony\Component\Console\Output\OutputInterface;
  6. class OutputStyle extends SymfonyStyle
  7. {
  8. /**
  9. * The output instance.
  10. *
  11. * @var \Symfony\Component\Console\Output\OutputInterface
  12. */
  13. private $output;
  14. /**
  15. * Create a new Console OutputStyle instance.
  16. *
  17. * @param \Symfony\Component\Console\Input\InputInterface $input
  18. * @param \Symfony\Component\Console\Output\OutputInterface $output
  19. * @return void
  20. */
  21. public function __construct(InputInterface $input, OutputInterface $output)
  22. {
  23. $this->output = $output;
  24. parent::__construct($input, $output);
  25. }
  26. /**
  27. * Returns whether verbosity is quiet (-q).
  28. *
  29. * @return bool
  30. */
  31. public function isQuiet()
  32. {
  33. return $this->output->isQuiet();
  34. }
  35. /**
  36. * Returns whether verbosity is verbose (-v).
  37. *
  38. * @return bool
  39. */
  40. public function isVerbose()
  41. {
  42. return $this->output->isVerbose();
  43. }
  44. /**
  45. * Returns whether verbosity is very verbose (-vv).
  46. *
  47. * @return bool
  48. */
  49. public function isVeryVerbose()
  50. {
  51. return $this->output->isVeryVerbose();
  52. }
  53. /**
  54. * Returns whether verbosity is debug (-vvv).
  55. *
  56. * @return bool
  57. */
  58. public function isDebug()
  59. {
  60. return $this->output->isDebug();
  61. }
  62. }