Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • ConsoleOutput
  • NullOutput
  • Output
  • StreamOutput

Interfaces

  • ConsoleOutputInterface
  • OutputInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class StreamOutput

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));

Symfony\Component\Console\Output\Output implements Symfony\Component\Console\Output\OutputInterface
Extended by Symfony\Component\Console\Output\StreamOutput

Direct known subclasses

Symfony\Component\Console\Output\ConsoleOutput
Namespace: Symfony\Component\Console\Output
Author: Fabien Potencier <fabien@symfony.com>
Api
Located at console/Symfony/Component/Console/Output/StreamOutput.php
Methods summary
public
# __construct( mixed $stream, integer $verbosity = Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL, Boolean $decorated = null, Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter = null )

Constructor.

Constructor.

Parameters

$stream
mixed
$stream A stream resource
$verbosity
integer
$verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE)
$decorated
Boolean
$decorated Whether to decorate messages or not (null for auto-guessing)
$formatter
Symfony\Component\Console\Formatter\OutputFormatterInterface
$formatter Output formatter instance

Throws

InvalidArgumentException
When first argument is not a real stream

Api

Overrides

Symfony\Component\Console\Output\Output::__construct()
public resource
# getStream( )

Gets the stream attached to this StreamOutput instance.

Gets the stream attached to this StreamOutput instance.

Returns

resource
A stream resource
protected
# doWrite( string $message, Boolean $newline )

Writes a message to the output.

Writes a message to the output.

Parameters

$message
string
$message A message to write to the output
$newline
Boolean
$newline Whether to add a newline or not

Throws

RuntimeException
When unable to write output (should never happen)
protected Boolean
# hasColorSupport( )

Returns true if the stream supports colorization.

Returns true if the stream supports colorization.

Colorization is disabled if not supported by the stream:
- windows without ansicon and ConEmu - non tty consoles

Returns

Boolean
true if the stream supports colorization, false otherwise
Methods inherited from Symfony\Component\Console\Output\Output
getFormatter(), getVerbosity(), isDecorated(), setDecorated(), setFormatter(), setVerbosity(), write(), writeln()
Constants inherited from Symfony\Component\Console\Output\OutputInterface
OUTPUT_NORMAL, OUTPUT_PLAIN, OUTPUT_RAW, VERBOSITY_NORMAL, VERBOSITY_QUIET, VERBOSITY_VERBOSE
php-coveralls API documentation generated by ApiGen 2.8.0