Method | Description | |
---|---|---|
__construct ( |
Creates an I/O based on the given input and outputs. | |
close ( ) | Closes the input and the outputs. | |
error ( string $string, integer $flags = null ) | Writes a string to the error output. | |
errorLine ( string $string, integer $flags = null ) | Writes a line of text to the error output. | |
errorLineRaw ( string $string, integer $flags = null ) | Writes a line of text to the error output without formatting. | |
errorRaw ( string $string, integer $flags = null ) | Writes a string to the error output without formatting. | |
flush ( ) | Flushes the outputs and forces all pending text to be written out. | |
format ( $string, |
||
getErrorOutput ( ) : |
Returns the error output. | |
getFormatter ( ) : Webmozart\Console\Api\Formatter\Formatter | Returns the output formatter. | |
getInput ( ) : |
Returns the standard input. | |
getOutput ( ) : |
Returns the standard output. | |
getTerminalDimensions ( ) : |
Returns the dimensions of the terminal. | |
getVerbosity ( ) : integer | Returns the current verbosity level. | |
isDebug ( ) : boolean | Returns whether the verbosity is {@link DEBUG}. | |
isInteractive ( ) : boolean | Returns whether the user may be asked for input. | |
isQuiet ( ) : boolean | Returns whether all output is suppressed. | |
isVerbose ( ) : boolean | Returns whether the verbosity is {@link VERBOSE} or greater. | |
isVeryVerbose ( ) : boolean | Returns whether the verbosity is {@link VERY_VERBOSE} or greater. | |
read ( integer $length, string $default = null ) : string | Reads the given amount of characters from the standard input. | |
readLine ( string $default = null, integer $length = null ) : string | Reads a line from the standard input. | |
removeFormat ( $string ) | ||
setFormatter ( Webmozart\Console\Api\Formatter\Formatter $formatter ) | Sets the output formatter. | |
setInteractive ( boolean $interactive ) | Enables or disables interaction with the user. | |
setQuiet ( boolean $quiet ) | Sets whether all output should be suppressed. | |
setTerminalDimensions ( |
Sets the dimensions of the terminal. | |
setVerbosity ( integer $verbosity ) | Sets the verbosity of the output. | |
write ( string $string, integer $flags = null ) | Writes a string to the standard output. | |
writeLine ( string $string, integer $flags = null ) | Writes a line of text to the standard output. | |
writeLineRaw ( string $string, integer $flags = null ) | Writes a line of text to the standard output without formatting. | |
writeRaw ( string $string, integer $flags = null ) | Writes a string to the standard output without formatting. |
Method | Description | |
---|---|---|
getDefaultTerminalDimensions ( ) : |
Returns the default terminal dimensions. |
public __construct ( |
||
$input | The standard input. | |
$output | The standard output. | |
$errorOutput | The error output. |
public errorLineRaw ( string $string, integer $flags = null ) | ||
$string | string | The string to write. A newline is appended. |
$flags | integer | The flags. One of {@link VERBOSE}, {@link VERY_VERBOSE} and {@link DEBUG}. |
public flush ( ) |
public format ( $string, |
||
$style |
protected getDefaultTerminalDimensions ( ) : |
||
return | The terminal dimensions. |
public getErrorOutput ( ) : |
||
return | The error output. |
public getFormatter ( ) : Webmozart\Console\Api\Formatter\Formatter | ||
return | Webmozart\Console\Api\Formatter\Formatter | The output formatter. |
public getInput ( ) : |
||
return | The input. |
public getOutput ( ) : |
||
return | The output. |
public getTerminalDimensions ( ) : |
||
return | The terminal dimensions. |
public getVerbosity ( ) : integer | ||
return | integer | One of the verbosity constants. |
public isInteractive ( ) : boolean | ||
return | boolean | Returns `true` if the user may be asked for input and `false` otherwise. |
public isVeryVerbose ( ) : boolean | ||
return | boolean | Returns `true` if the verbosity is {@link VERY_VERBOSE} or greater and `false` otherwise. |
public readLine ( string $default = null, integer $length = null ) : string | ||
$default | string | The default to return if interaction is disabled. |
$length | integer | The maximum number of characters to read. If `null`, all characters up to the first newline are returned. |
return | string | The characters read from the input. |
public setFormatter ( Webmozart\Console\Api\Formatter\Formatter $formatter ) | ||
$formatter | Webmozart\Console\Api\Formatter\Formatter | The output formatter. |
public setInteractive ( boolean $interactive ) | ||
$interactive | boolean | Whether the I/O may interact with the user. If set to `false`, all calls to {@link read()} and {@link readLine()} will immediately return the default value. |
public setTerminalDimensions ( |
||
$dimensions | The terminal dimensions. |
public setVerbosity ( integer $verbosity ) | ||
$verbosity | integer | One of the constants {@link NORMAL}, {@link VERBOSE}, {@link VERY_VERBOSE} or {@link DEBUG}. Only output with the given verbosity level or smaller will be passed through. |
public writeLineRaw ( string $string, integer $flags = null ) | ||
$string | string | The string to write. A newline is appended. |
$flags | integer | The flags. One of {@link VERBOSE}, {@link VERY_VERBOSE} and {@link DEBUG}. |