PHP 클래스 Webmozart\Console\Api\IO\IO

부터: 1.0
저자: Bernhard Schussek ([email protected])
상속: implements Webmozart\Console\Api\Formatter\Formatter
파일 보기 프로젝트 열기: webmozart/console 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Input $input, Output $output, Output $errorOutput ) 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, Style $style = null )
getErrorOutput ( ) : Output Returns the error output.
getFormatter ( ) : Webmozart\Console\Api\Formatter\Formatter Returns the output formatter.
getInput ( ) : Input Returns the standard input.
getOutput ( ) : Output Returns the standard output.
getTerminalDimensions ( ) : Rectangle 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 ( Rectangle $dimensions ) 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.

보호된 메소드들

메소드 설명
getDefaultTerminalDimensions ( ) : Rectangle Returns the default terminal dimensions.

메소드 상세

__construct() 공개 메소드

Creates an I/O based on the given input and outputs.
public __construct ( Input $input, Output $output, Output $errorOutput )
$input Input The standard input.
$output Output The standard output.
$errorOutput Output The error output.

close() 공개 메소드

Closes the input and the outputs.
public close ( )

error() 공개 메소드

The string is formatted before it is written to the output.
public error ( string $string, integer $flags = null )
$string string The string to write.
$flags integer The flags. One of {@link VERBOSE}, {@link VERY_VERBOSE} and {@link DEBUG}.

errorLine() 공개 메소드

The string is formatted before it is written to the output.
public errorLine ( 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}.

errorLineRaw() 공개 메소드

Writes a line of text to the error output without formatting.
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}.

errorRaw() 공개 메소드

Writes a string to the error output without formatting.
public errorRaw ( string $string, integer $flags = null )
$string string The string to write.
$flags integer The flags. One of {@link VERBOSE}, {@link VERY_VERBOSE} and {@link DEBUG}.

flush() 공개 메소드

Flushes the outputs and forces all pending text to be written out.
public flush ( )

format() 공개 메소드

public format ( $string, Style $style = null )
$style Webmozart\Console\Api\Formatter\Style

getDefaultTerminalDimensions() 보호된 메소드

Returns the default terminal dimensions.
protected getDefaultTerminalDimensions ( ) : Rectangle
리턴 Webmozart\Console\UI\Rectangle The terminal dimensions.

getErrorOutput() 공개 메소드

Returns the error output.
public getErrorOutput ( ) : Output
리턴 Output The error output.

getFormatter() 공개 메소드

Returns the output formatter.
public getFormatter ( ) : Webmozart\Console\Api\Formatter\Formatter
리턴 Webmozart\Console\Api\Formatter\Formatter The output formatter.

getInput() 공개 메소드

Returns the standard input.
public getInput ( ) : Input
리턴 Input The input.

getOutput() 공개 메소드

Returns the standard output.
public getOutput ( ) : Output
리턴 Output The output.

getTerminalDimensions() 공개 메소드

Returns the dimensions of the terminal.
public getTerminalDimensions ( ) : Rectangle
리턴 Webmozart\Console\UI\Rectangle The terminal dimensions.

getVerbosity() 공개 메소드

Returns the current verbosity level.
public getVerbosity ( ) : integer
리턴 integer One of the verbosity constants.

isDebug() 공개 메소드

Returns whether the verbosity is {@link DEBUG}.
public isDebug ( ) : boolean
리턴 boolean Returns `true` if the verbosity is {@link DEBUG} and `false` otherwise.

isInteractive() 공개 메소드

Returns whether the user may be asked for input.
public isInteractive ( ) : boolean
리턴 boolean Returns `true` if the user may be asked for input and `false` otherwise.

isQuiet() 공개 메소드

Returns whether all output is suppressed.
public isQuiet ( ) : boolean
리턴 boolean Returns `true` if all output is suppressed and `false` otherwise.

isVerbose() 공개 메소드

Returns whether the verbosity is {@link VERBOSE} or greater.
public isVerbose ( ) : boolean
리턴 boolean Returns `true` if the verbosity is {@link VERBOSE} or greater and `false` otherwise.

isVeryVerbose() 공개 메소드

Returns whether the verbosity is {@link VERY_VERBOSE} or greater.
public isVeryVerbose ( ) : boolean
리턴 boolean Returns `true` if the verbosity is {@link VERY_VERBOSE} or greater and `false` otherwise.

read() 공개 메소드

Reads the given amount of characters from the standard input.
public read ( integer $length, string $default = null ) : string
$length integer The number of characters to read.
$default string The default to return if interaction is disabled.
리턴 string The characters read from the input.

readLine() 공개 메소드

Reads a line from the standard input.
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.
리턴 string The characters read from the input.

removeFormat() 공개 메소드

public removeFormat ( $string )

setFormatter() 공개 메소드

Sets the output formatter.
public setFormatter ( Webmozart\Console\Api\Formatter\Formatter $formatter )
$formatter Webmozart\Console\Api\Formatter\Formatter The output formatter.

setInteractive() 공개 메소드

Enables or disables interaction with the user.
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.

setQuiet() 공개 메소드

Sets whether all output should be suppressed.
public setQuiet ( boolean $quiet )
$quiet boolean Pass `true` to suppress all output and `false` otherwise.

setTerminalDimensions() 공개 메소드

Sets the dimensions of the terminal.
public setTerminalDimensions ( Rectangle $dimensions )
$dimensions Webmozart\Console\UI\Rectangle The terminal dimensions.

setVerbosity() 공개 메소드

Sets the verbosity of the output.
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.

write() 공개 메소드

The string is formatted before it is written to the output.
public write ( string $string, integer $flags = null )
$string string The string to write.
$flags integer The flags. One of {@link VERBOSE}, {@link VERY_VERBOSE} and {@link DEBUG}.

writeLine() 공개 메소드

The string is formatted before it is written to the output.
public writeLine ( 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}.

writeLineRaw() 공개 메소드

Writes a line of text to the standard output without formatting.
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}.

writeRaw() 공개 메소드

Writes a string to the standard output without formatting.
public writeRaw ( string $string, integer $flags = null )
$string string The string to write.
$flags integer The flags. One of {@link VERBOSE}, {@link VERY_VERBOSE} and {@link DEBUG}.