2010-01-04 14:42:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
2011-01-15 13:29:43 +00:00
|
|
|
* This file is part of the Symfony package.
|
2010-01-04 14:42:28 +00:00
|
|
|
*
|
2011-03-06 11:40:06 +00:00
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
2010-01-04 14:42:28 +00:00
|
|
|
*
|
2011-01-15 13:29:43 +00:00
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
2010-01-04 14:42:28 +00:00
|
|
|
*/
|
|
|
|
|
2011-01-15 13:29:43 +00:00
|
|
|
namespace Symfony\Component\Console\Output;
|
|
|
|
|
2011-03-17 15:53:46 +00:00
|
|
|
use Symfony\Component\Console\Formatter\OutputFormatter;
|
|
|
|
|
2010-01-04 14:42:28 +00:00
|
|
|
/**
|
|
|
|
* ConsoleOutput is the default class for all CLI output. It uses STDOUT.
|
|
|
|
*
|
|
|
|
* This class is a convenient wrapper around `StreamOutput`.
|
|
|
|
*
|
|
|
|
* $output = new ConsoleOutput();
|
|
|
|
*
|
|
|
|
* This is equivalent to:
|
|
|
|
*
|
|
|
|
* $output = new StreamOutput(fopen('php://stdout', 'w'));
|
|
|
|
*
|
2011-03-06 11:40:06 +00:00
|
|
|
* @author Fabien Potencier <fabien@symfony.com>
|
2010-01-04 14:42:28 +00:00
|
|
|
*/
|
|
|
|
class ConsoleOutput extends StreamOutput
|
|
|
|
{
|
2010-05-06 12:25:53 +01:00
|
|
|
/**
|
|
|
|
* Constructor.
|
|
|
|
*
|
|
|
|
* @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE)
|
|
|
|
* @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing)
|
2011-03-17 15:53:46 +00:00
|
|
|
* @param OutputFormatter $formatter Output formatter instance
|
2010-05-06 12:25:53 +01:00
|
|
|
*/
|
2011-03-17 16:51:01 +00:00
|
|
|
public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatter $formatter = null)
|
2010-05-06 12:25:53 +01:00
|
|
|
{
|
2011-03-17 15:53:46 +00:00
|
|
|
parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated, $formatter);
|
2010-05-06 12:25:53 +01:00
|
|
|
}
|
2010-01-04 14:42:28 +00:00
|
|
|
}
|