127 lines
3.4 KiB
YAML
127 lines
3.4 KiB
YAML
|
name: StreamOutput
|
||
|
class_comment: '# * StreamOutput writes the output to a given stream.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * Usage:
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * $output = new StreamOutput(fopen(''php://stdout'', ''w''));
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * As `StreamOutput` can use any stream, you can also use a file:
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * $output = new StreamOutput(fopen(''/path/to/output.log'', ''a'', false));
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @author Fabien Potencier <fabien@symfony.com>'
|
||
|
dependencies:
|
||
|
- name: InvalidArgumentException
|
||
|
type: class
|
||
|
source: Symfony\Component\Console\Exception\InvalidArgumentException
|
||
|
- name: OutputFormatterInterface
|
||
|
type: class
|
||
|
source: Symfony\Component\Console\Formatter\OutputFormatterInterface
|
||
|
properties:
|
||
|
- name: stream
|
||
|
visibility: private
|
||
|
comment: '# * StreamOutput writes the output to a given stream.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * Usage:
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * $output = new StreamOutput(fopen(''php://stdout'', ''w''));
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * As `StreamOutput` can use any stream, you can also use a file:
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * $output = new StreamOutput(fopen(''/path/to/output.log'', ''a'', false));
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @author Fabien Potencier <fabien@symfony.com>
|
||
|
|
||
|
# */
|
||
|
|
||
|
# class StreamOutput extends Output
|
||
|
|
||
|
# {
|
||
|
|
||
|
# /** @var resource'
|
||
|
methods:
|
||
|
- name: __construct
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: stream
|
||
|
- name: verbosity
|
||
|
default: self::VERBOSITY_NORMAL
|
||
|
- name: decorated
|
||
|
default: 'null'
|
||
|
- name: formatter
|
||
|
default: 'null'
|
||
|
comment: "# * StreamOutput writes the output to a given stream.\n# *\n# * Usage:\n\
|
||
|
# *\n# * $output = new StreamOutput(fopen('php://stdout', 'w'));\n# *\n# *\
|
||
|
\ As `StreamOutput` can use any stream, you can also use a file:\n# *\n# * \
|
||
|
\ $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));\n# *\n\
|
||
|
# * @author Fabien Potencier <fabien@symfony.com>\n# */\n# class StreamOutput\
|
||
|
\ extends Output\n# {\n# /** @var resource */\n# private $stream;\n# \n# /**\n\
|
||
|
# * @param resource $stream A stream resource\n# * @param\
|
||
|
\ int $verbosity The verbosity level (one of the VERBOSITY\
|
||
|
\ constants in OutputInterface)\n# * @param bool|null $decorated\
|
||
|
\ Whether to decorate messages (null for auto-guessing)\n# * @param OutputFormatterInterface|null\
|
||
|
\ $formatter Output formatter instance (null to use default OutputFormatter)\n\
|
||
|
# *\n# * @throws InvalidArgumentException When first argument is not a real stream"
|
||
|
- name: getStream
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Gets the stream attached to this StreamOutput instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return resource'
|
||
|
- name: doWrite
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: message
|
||
|
- name: newline
|
||
|
comment: null
|
||
|
- name: hasColorSupport
|
||
|
visibility: protected
|
||
|
parameters: []
|
||
|
comment: '# * Returns true if the stream supports colorization.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * Colorization is disabled if not supported by the stream:
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo
|
||
|
|
||
|
# * terminals via named pipes, so we can only check the environment.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * Reference: Composer\XdebugHandler\Process::supportsColor
|
||
|
|
||
|
# * https://github.com/composer/xdebug-handler
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return bool true if the stream supports colorization, false otherwise'
|
||
|
traits:
|
||
|
- Symfony\Component\Console\Exception\InvalidArgumentException
|
||
|
- Symfony\Component\Console\Formatter\OutputFormatterInterface
|
||
|
interfaces: []
|