PHP 클래스 PHPDaemon\Utils\Terminal

저자: Vasily Zorin ([email protected])
상속: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
파일 보기 프로젝트 열기: kakserpom/phpdaemon 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$columns Maximum terminal width
$enableColor Is color allowed in terminal?

공개 메소드들

메소드 설명
__construct ( ) Constructor
clearScreen ( ) : void Clear the terminal with CLR
drawParam ( string $name, string $description, array $values = '' ) : void Draw param (like in man)
drawTable ( $rows ) : void Draw a table
enableColor ( boolean $bool = true ) : void Enables/disable color
readln ( ) : string Read a line from STDIN
resetStyle ( ) : void Reset style to default
setStyle ( string $c ) : void Set text style

보호된 메소드들

메소드 설명
getMaxColumns ( ) : integer Counting terminal char width

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

clearScreen() 공개 메소드

Clear the terminal with CLR
public clearScreen ( ) : void
리턴 void

drawParam() 공개 메소드

Draw param (like in man)
public drawParam ( string $name, string $description, array $values = '' ) : void
$name string Param name
$description string Param description
$values array Param allowed values
리턴 void

drawTable() 공개 메소드

Draw a table
public drawTable ( $rows ) : void
리턴 void

enableColor() 공개 메소드

Enables/disable color
public enableColor ( boolean $bool = true ) : void
$bool boolean Enable?
리턴 void

getMaxColumns() 보호된 메소드

Counting terminal char width
protected getMaxColumns ( ) : integer
리턴 integer

readln() 공개 메소드

Read a line from STDIN
public readln ( ) : string
리턴 string Line

resetStyle() 공개 메소드

Reset style to default
public resetStyle ( ) : void
리턴 void

setStyle() 공개 메소드

Set text style
public setStyle ( string $c ) : void
$c string Style
리턴 void

프로퍼티 상세

$columns 보호되어 있는 프로퍼티

Maximum terminal width
protected $columns

$enableColor 보호되어 있는 프로퍼티

Is color allowed in terminal?
protected $enableColor