Overview

Namespaces

  • Evenement
  • None
  • Peridot
    • Console
    • Core
    • Reporter
    • Runner
    • Scope
    • Test
  • Symfony
    • Component
      • Console
        • Command
        • Descriptor
        • Event
        • Exception
        • Formatter
        • Helper
        • Input
        • Logger
        • Output
        • Question
        • Style
        • Tester
        • Tests
          • Command
          • Descriptor
          • Fixtures
          • Formatter
          • Helper
          • Input
          • Logger
          • Output
          • Style
          • Tester

Classes

  • BufferedOutput
  • ConsoleOutput
  • NullOutput
  • Output
  • StreamOutput

Interfaces

  • ConsoleOutputInterface
  • OutputInterface
  • Overview
  • Namespace
  • Class

Class Output

Base class for output classes.

There are five levels of verbosity: * normal: no option passed (normal output) * verbose: -v (more output) * very verbose: -vv (highly extended output) * debug: -vvv (all debug output) * quiet: -q (no output)

Symfony\Component\Console\Output\Output implements Symfony\Component\Console\Output\OutputInterface

Direct known subclasses

Symfony\Component\Console\Output\BufferedOutput, Symfony\Component\Console\Output\StreamOutput, Symfony\Component\Console\Tests\Output\TestOutput

Indirect known subclasses

Symfony\Component\Console\Output\ConsoleOutput, Symfony\Component\Console\Tests\Fixtures\DummyOutput
Abstract
Namespace: Symfony\Component\Console\Output
Author: Fabien Potencier fabien@symfony.com
Located at Output/Output.php
Methods summary
public
# __construct( integer $verbosity = self::VERBOSITY_NORMAL, boolean $decorated = false, Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter = null )

Constructor.

Constructor.

Parameters

$verbosity
The verbosity level (one of the VERBOSITY constants in OutputInterface)
$decorated
Whether to decorate messages
$formatter
Output formatter instance (null to use default OutputFormatter)
public
# setFormatter( Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter )

Sets output formatter.

Sets output formatter.

Parameters

$formatter

Implementation of

Symfony\Component\Console\Output\OutputInterface::setFormatter()
public Symfony\Component\Console\Formatter\OutputFormatterInterface
# getFormatter( )

Returns current output formatter instance.

Returns current output formatter instance.

Returns

Symfony\Component\Console\Formatter\OutputFormatterInterface

Implementation of

Symfony\Component\Console\Output\OutputInterface::getFormatter()
public
# setDecorated( boolean $decorated )

Sets the decorated flag.

Sets the decorated flag.

Parameters

$decorated
Whether to decorate the messages

Implementation of

Symfony\Component\Console\Output\OutputInterface::setDecorated()
public boolean
# isDecorated( )

Gets the decorated flag.

Gets the decorated flag.

Returns

boolean
true if the output will decorate messages, false otherwise

Implementation of

Symfony\Component\Console\Output\OutputInterface::isDecorated()
public
# setVerbosity( integer $level )

Sets the verbosity of the output.

Sets the verbosity of the output.

Parameters

$level
The level of verbosity (one of the VERBOSITY constants)

Implementation of

Symfony\Component\Console\Output\OutputInterface::setVerbosity()
public integer
# getVerbosity( )

Gets the current verbosity of the output.

Gets the current verbosity of the output.

Returns

integer
The current level of verbosity (one of the VERBOSITY constants)

Implementation of

Symfony\Component\Console\Output\OutputInterface::getVerbosity()
public
# isQuiet( )
public
# isVerbose( )
public
# isVeryVerbose( )
public
# isDebug( )
public
# writeln( string|array $messages, integer $options = self::OUTPUT_NORMAL )

Writes a message to the output and adds a newline at the end.

Writes a message to the output and adds a newline at the end.

Parameters

$messages
The message as an array of lines of a single string
$options
A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL

Implementation of

Symfony\Component\Console\Output\OutputInterface::writeln()
public
# write( string|array $messages, boolean $newline = false, integer $options = self::OUTPUT_NORMAL )

Writes a message to the output.

Writes a message to the output.

Parameters

$messages
The message as an array of lines or a single string
$newline
Whether to add a newline
$options
A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL

Implementation of

Symfony\Component\Console\Output\OutputInterface::write()
abstract protected
# doWrite( string $message, boolean $newline )

Writes a message to the output.

Writes a message to the output.

Parameters

$message
A message to write to the output
$newline
Whether to add a newline or not
Constants inherited from Symfony\Component\Console\Output\OutputInterface
OUTPUT_NORMAL, OUTPUT_PLAIN, OUTPUT_RAW, VERBOSITY_DEBUG, VERBOSITY_NORMAL, VERBOSITY_QUIET, VERBOSITY_VERBOSE, VERBOSITY_VERY_VERBOSE
Peridot API documentation generated by ApiGen