SymfonyComponentConsoleOutputConsoleOutputInterface

ConsoleOutputInterface is the interface implemented by ConsoleOutput class.

This adds information about stderr output stream.

Methods

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

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

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

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

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

getErrorOutput()

getErrorOutput() : \Symfony\Component\Console\Output\OutputInterface

Returns

SymfonyComponentConsoleOutputOutputInterface

Tags

None found

setErrorOutput()

setErrorOutput(\Symfony\Component\Console\Output\OutputInterface  $error) 

Parameters

SymfonyComponentConsoleOutputOutputInterface $error

Tags

None found