Symfony2 API
Class

Symfony\Component\Console\Output\NullOutput

class NullOutput implements OutputInterface

NullOutput suppresses all output.

$output = new NullOutput();

Methods

setFormatter(OutputFormatterInterface $formatter)

Sets output formatter.

OutputFormatterInterface getFormatter()

Returns current output formatter instance.

setDecorated(Boolean $decorated)

Sets the decorated flag.

Boolean isDecorated()

Gets the decorated flag.

setVerbosity(integer $level)

Sets the verbosity of the output.

integer getVerbosity()

Gets the current verbosity of the output.

writeln(string|array $messages, integer $type = self::OUTPUT_NORMAL)

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

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

Writes a message to the output.

Details

at line 32
public setFormatter(OutputFormatterInterface $formatter)

Sets output formatter.

Parameters

OutputFormatterInterface $formatter

at line 40
public OutputFormatterInterface getFormatter()

Returns current output formatter instance.

at line 49
public setDecorated(Boolean $decorated)

Sets the decorated flag.

Parameters

Boolean $decorated Whether to decorate the messages

at line 57
public Boolean isDecorated()

Gets the decorated flag.

Return Value

Boolean true if the output will decorate messages, false otherwise

at line 65
public setVerbosity(integer $level)

Sets the verbosity of the output.

Parameters

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

at line 73
public integer getVerbosity()

Gets the current verbosity of the output.

Return Value

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

at line 81
public writeln(string|array $messages, integer $type = self::OUTPUT_NORMAL)

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 (one of the OUTPUT constants)

Exceptions

InvalidArgumentException When unknown output type is given

at line 89
public write(string|array $messages, Boolean $newline = false, integer $type = self::OUTPUT_NORMAL)

Writes a message to the output.

Parameters

string|array $messages The message as an array of lines or a single string
Boolean $newline Whether to add a newline
integer $type The type of output (one of the OUTPUT constants)

Exceptions

InvalidArgumentException When unknown output type is given