SymfonyComponentConsoleOutputNullOutput

NullOutput suppresses all output.

$output = new NullOutput();

Summary

No protected methods found
No protected properties found
N/A
No private methods found
N/A
File
vendorSymfonyComponentConsoleOutputNullOutput.php
Package
Default
Class hierarchy
SymfonyComponentConsoleOutputNullOutput

Tags

author

Fabien Potencier fabien@symfony.com

api

Properties

$verbosity

$verbosity : 

Type

Inherited from
SymfonyComponentConsoleOutputOutput

Tags

None found

$formatter

$formatter : 

Type

Inherited from
SymfonyComponentConsoleOutputOutput

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

setFormatter()

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

Sets output formatter.

Parameters

SymfonyComponentConsoleFormatterOutputFormatterInterface $formatter

getFormatter()

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

Returns current output formatter instance.

Returns

SymfonyComponentConsoleFormatterOutputFormatterInterface

setDecorated()

setDecorated(Boolean  $decorated) 

Sets the decorated flag.

Parameters

Boolean $decorated

Whether to decorate the messages or not

isDecorated()

isDecorated() : Boolean

Gets the decorated flag.

Returns

Boolean —

true if the output will decorate messages, false otherwise

setVerbosity()

setVerbosity(integer  $level) 

Sets the verbosity of the output.

Parameters

integer $level

The level of verbosity

getVerbosity()

getVerbosity() : integer

Gets the current verbosity of the output.

Returns

integer —

The current level of verbosity

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

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

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

Tags

None found