PHP Class Eva\EvaEngine\CLI\Output\ConsoleOutput

This class is a convenient wrapper around StreamOutput. $output = new ConsoleOutput(); This is equivalent to: $output = new StreamOutput(fopen('php://stdout', 'w'));
Author: Fabien Potencier ([email protected])
Inheritance: extends Eva\EvaEngine\CLI\Output\StreamOutput, implements Eva\EvaEngine\CLI\Output\ConsoleOutputInterface
Show file Open project: evaengine/evaengine Class Usage Examples

Public Methods

Method Description
__construct ( integer $verbosity = self::VERBOSITY_NORMAL, boolean | null $decorated = null, Eva\EvaEngine\CLI\Formatter\OutputFormatterInterface $formatter = null ) Constructor.
getErrorOutput ( )
setDecorated ( $decorated )
setErrorOutput ( Eva\EvaEngine\CLI\Output\OutputInterface $error )
setFormatter ( Eva\EvaEngine\CLI\Formatter\OutputFormatterInterface $formatter )
setVerbosity ( $level )
writeList ( array $list )
writelnComment ( $message, $type = self::OUTPUT_NORMAL )
writelnError ( $message, $type = self::OUTPUT_NORMAL )
writelnInfo ( $message, $type = self::OUTPUT_NORMAL )
writelnSuccess ( $message, $type = self::OUTPUT_NORMAL )
writelnWarning ( $message, $type = self::OUTPUT_NORMAL )

Protected Methods

Method Description
hasStdoutSupport ( ) : boolean Returns true if current environment supports writing console output to STDOUT.

Private Methods

Method Description
getSpace ( $length )

Method Details

__construct() public method

Constructor.
public __construct ( integer $verbosity = self::VERBOSITY_NORMAL, boolean | null $decorated = null, Eva\EvaEngine\CLI\Formatter\OutputFormatterInterface $formatter = null )
$verbosity integer The verbosity level (one of the VERBOSITY constants in OutputInterface)
$decorated boolean | null Whether to decorate messages (null for auto-guessing)
$formatter Eva\EvaEngine\CLI\Formatter\OutputFormatterInterface Output formatter instance (null to use default OutputFormatter)

getErrorOutput() public method

public getErrorOutput ( )

hasStdoutSupport() protected method

IBM iSeries (OS400) exhibits character-encoding issues when writing to STDOUT and doesn't properly convert ASCII to EBCDIC, resulting in garbage output.
protected hasStdoutSupport ( ) : boolean
return boolean

setDecorated() public method

public setDecorated ( $decorated )

setErrorOutput() public method

public setErrorOutput ( Eva\EvaEngine\CLI\Output\OutputInterface $error )
$error Eva\EvaEngine\CLI\Output\OutputInterface

setFormatter() public method

public setFormatter ( Eva\EvaEngine\CLI\Formatter\OutputFormatterInterface $formatter )
$formatter Eva\EvaEngine\CLI\Formatter\OutputFormatterInterface

setVerbosity() public method

public setVerbosity ( $level )

writeList() public method

public writeList ( array $list )
$list array

writelnComment() public method

public writelnComment ( $message, $type = self::OUTPUT_NORMAL )

writelnError() public method

public writelnError ( $message, $type = self::OUTPUT_NORMAL )

writelnInfo() public method

public writelnInfo ( $message, $type = self::OUTPUT_NORMAL )

writelnSuccess() public method

public writelnSuccess ( $message, $type = self::OUTPUT_NORMAL )

writelnWarning() public method

public writelnWarning ( $message, $type = self::OUTPUT_NORMAL )