Interface

Symfony\Component\Console\Output\OutputInterface

interface OutputInterface

OutputInterface is the interface implemented by all Output classes.

Constants

VERBOSITY_QUIET

VERBOSITY_NORMAL

VERBOSITY_VERBOSE

OUTPUT_NORMAL

OUTPUT_RAW

OUTPUT_PLAIN

Methods

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

Writes a message to the output.

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

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

setVerbosity(integer $level)

Sets the verbosity of the output.

integer getVerbosity()

Gets the current verbosity of the output.

setDecorated(Boolean $decorated)

Sets the decorated flag.

Boolean isDecorated()

Gets the decorated flag.

setFormatter(OutputFormatterInterface $formatter)

Sets output formatter.

OutputFormatterInterface getFormatter()

Returns current output formatter instance.

Details

at line 44
public 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 or a single string
Boolean $newline Whether to add a newline or not
integer $type The type of output

Exceptions

InvalidArgumentException When unknown output type is given

at line 54
public 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 or a single string
integer $type The type of output

at line 63
public setVerbosity(integer $level)

Sets the verbosity of the output.

Parameters

integer $level The level of verbosity

at line 72
public integer getVerbosity()

Gets the current verbosity of the output.

Return Value

integer The current level of verbosity

at line 81
public setDecorated(Boolean $decorated)

Sets the decorated flag.

Parameters

Boolean $decorated Whether to decorate the messages or not

at line 90
public Boolean isDecorated()

Gets the decorated flag.

Return Value

Boolean true if the output will decorate messages, false otherwise

at line 99
public setFormatter(OutputFormatterInterface $formatter)

Sets output formatter.

Parameters

OutputFormatterInterface $formatter

at line 108
public OutputFormatterInterface getFormatter()

Returns current output formatter instance.