ConsoleOutput.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Symfony\Component\Console\Output;
  3. /*
  4. * This file is part of the Symfony framework.
  5. *
  6. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. /**
  12. * ConsoleOutput is the default class for all CLI output. It uses STDOUT.
  13. *
  14. * This class is a convenient wrapper around `StreamOutput`.
  15. *
  16. * $output = new ConsoleOutput();
  17. *
  18. * This is equivalent to:
  19. *
  20. * $output = new StreamOutput(fopen('php://stdout', 'w'));
  21. *
  22. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  23. */
  24. class ConsoleOutput extends StreamOutput
  25. {
  26. /**
  27. * Constructor.
  28. *
  29. * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE)
  30. * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
  31. */
  32. public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null)
  33. {
  34. parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated);
  35. }
  36. }