프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_err | The error stream | ||
$_helpers | Cake\Console\HelperRegistry | The helper registry. | |
$_in | Cake\Console\ConsoleInput | The input stream | |
$_lastWritten | integer | The number of bytes last written to the output stream used when overwriting the previous message. | |
$_level | integer | The current output level. | |
$_out | The output stream |
메소드 | 설명 | |
---|---|---|
__construct ( |
Constructor | |
ask ( string $prompt, string | null $default = null ) : mixed | Prompts the user for input, and returns it. | |
askChoice ( string $prompt, string | array $options, string | null $default = null ) : mixed | Prompts the user for input based on a list of options, and returns it. | |
err ( string | array $message = '', integer $newlines = 1 ) : integer | boolean | Outputs a single or multiple error messages to stderr. If no parameters are passed outputs just a newline. | |
helper ( string $name, array $settings = [] ) : Cake\Console\Helper | Render a Console Helper | |
hr ( integer $newlines, integer $width = 79 ) : void | Outputs a series of minus characters to the standard output, acts as a visual separator. | |
level ( null | integer $level = null ) : integer | Get/set the current output level. | |
nl ( integer $multiplier = 1 ) : string | Returns a single or multiple linefeeds sequences. | |
out ( string | array $message = '', integer $newlines = 1, integer $level = ConsoleIo::NORMAL ) : integer | boolean | Outputs a single or multiple messages to stdout. If no parameters are passed outputs just a newline. | |
outputAs ( integer $mode ) : void | Change the output mode of the stdout stream | |
overwrite ( array | string $message, integer $newlines = 1, integer | null $size = null ) : void | Overwrite some already output text. | |
quiet ( string | array $message, integer $newlines = 1 ) : integer | boolean | Output at all levels. | |
setLoggers ( integer | boolean $enable ) : void | Connects or disconnects the loggers to the console output. | |
styles ( string | null $style = null, array | boolean | null $definition = null ) : mixed | Add a new output style or get defined styles. | |
verbose ( string | array $message, integer $newlines = 1 ) : integer | boolean | Output at the verbose level. |
메소드 | 설명 | |
---|---|---|
_getInput ( string $prompt, string | null $options, string | null $default ) : string | Prompts the user for input, and returns it. |
public __construct ( |
||
$out | A ConsoleOutput object for stdout. | |
$err | A ConsoleOutput object for stderr. | |
$in | Cake\Console\ConsoleInput | A ConsoleInput object for stdin. |
$helpers | Cake\Console\HelperRegistry | A HelperRegistry instance |
protected _getInput ( string $prompt, string | null $options, string | null $default ) : string | ||
$prompt | string | Prompt text. |
$options | string | null | String of options. Pass null to omit. |
$default | string | null | Default input value. Pass null to omit. |
리턴 | string | Either the default value, or the user-provided input. |
public out ( string | array $message = '', integer $newlines = 1, integer $level = ConsoleIo::NORMAL ) : integer | boolean | ||
$message | string | array | A string or an array of strings to output |
$newlines | integer | Number of newlines to append |
$level | integer | The message's output level, see above. |
리턴 | integer | boolean | The number of bytes returned from writing to stdout. |
public overwrite ( array | string $message, integer $newlines = 1, integer | null $size = null ) : void | ||
$message | array | string | The message to output. |
$newlines | integer | Number of newlines to append. |
$size | integer | null | The number of bytes to overwrite. Defaults to the length of the last message output. |
리턴 | void |
public setLoggers ( integer | boolean $enable ) : void | ||
$enable | integer | boolean | Use a boolean to enable/toggle all logging. Use one of the verbosity constants (self::VERBOSE, self::QUIET, self::NORMAL) to control logging levels. VERBOSE enables debug logs, NORMAL does not include debug logs, QUIET disables notice, info and debug logs. |
리턴 | void |
public styles ( string | null $style = null, array | boolean | null $definition = null ) : mixed | ||
$style | string | null | The style to get or create. |
$definition | array | boolean | null | The array definition of the style to change or create a style or false to remove a style. |
리턴 | mixed | If you are getting styles, the style or null will be returned. If you are creating/modifying styles true will be returned. |
protected HelperRegistry,Cake\Console $_helpers | ||
리턴 | Cake\Console\HelperRegistry |
protected ConsoleInput,Cake\Console $_in | ||
리턴 | Cake\Console\ConsoleInput |
protected int $_lastWritten | ||
리턴 | integer |