SymfonyComponentConsoleOutputOutput

Base class for output classes.

There are three levels of verbosity:

  • normal: no option passed (normal output - information)
  • verbose: -v (more output - debug)
  • quiet: -q (no output)

Summary

No protected methods found
No protected properties found
N/A
No private methods found
N/A
abstract
File
vendorSymfonyComponentConsoleOutputOutput.php
Package
Default
Class hierarchy
SymfonyComponentConsoleOutputOutput
Implements
SymfonyComponentConsoleOutputOutputInterface

Tags

author

Fabien Potencier fabien@symfony.com

api

Properties

$verbosity

$verbosity : 

Type

Tags

None found

$formatter

$formatter : 

Type

Tags

None found

Methods

__construct()

__construct(integer  $verbosity = self::VERBOSITY_NORMAL, Boolean  $decorated = null, \Symfony\Component\Console\Formatter\OutputFormatterInterface  $formatter = null) 

Constructor.

Parameters

integer $verbosity

The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE)

Boolean $decorated

Whether to decorate messages or not (null for auto-guessing)

SymfonyComponentConsoleFormatterOutputFormatterInterface $formatter

Output formatter instance

Tags

api

setFormatter()

setFormatter(\Symfony\Component\Console\Formatter\OutputFormatterInterface  $formatter) 

Sets output formatter.

Parameters

SymfonyComponentConsoleFormatterOutputFormatterInterface $formatter

Tags

api

getFormatter()

getFormatter() : \Symfony\Component\Console\Formatter\OutputFormatterInterface

Returns current output formatter instance.

Returns

SymfonyComponentConsoleFormatterOutputFormatterInterface

Tags

api

setDecorated()

setDecorated(Boolean  $decorated) 

Sets the decorated flag.

Parameters

Boolean $decorated

Whether to decorate the messages or not

Tags

api

isDecorated()

isDecorated() : Boolean

Gets the decorated flag.

Returns

Boolean —

true if the output will decorate messages, false otherwise

Tags

api

setVerbosity()

setVerbosity(integer  $level) 

Sets the verbosity of the output.

Parameters

integer $level

The level of verbosity

Tags

api

getVerbosity()

getVerbosity() : integer

Gets the current verbosity of the output.

Returns

integer —

The current level of verbosity

Tags

api

writeln()

writeln(string|array  $messages, integer  $type) 

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

Parameters

string|array $messages

The message as an array of lines of a single string

integer $type

The type of output

Tags

api

write()

write(string|array  $messages, Boolean  $newline = false, integer  $type) 

Writes a message to the output.

Parameters

string|array $messages

The message as an array of lines of a single string

Boolean $newline

Whether to add a newline or not

integer $type

The type of output

Throws

InvalidArgumentException

When unknown output type is given

Tags

api

doWrite()

doWrite(string  $message, Boolean  $newline) 

Writes a message to the output.

Parameters

string $message

A message to write to the output

Boolean $newline

Whether to add a newline or not

abstract

Tags

None found