PHP 클래스 Cml\Console\Format\Colour

또한 보기: http://www.linuxselfhelp.com/howtos/Bash-Prompt/Bash-Prompt-HOWTO-6.html
파일 보기 프로젝트 열기: linhecheng/cmlphp 1 사용 예제들

공개 메소드들

메소드 설명
__callStatic ( string $method, array $args ) : string 静态方法
colour ( string $text, string | array | integer $foregroundColors = null, string | integer $backgroundColors = null ) : string 返回格式化后的字符串
setNoAnsi ( ) 不输出 ansi字符

비공개 메소드들

메소드 설명
charToCode ( integer | string | array $color ) : array 返回颜色对应的数字编码

메소드 상세

__callStatic() 공개 정적인 메소드

静态方法
public static __callStatic ( string $method, array $args ) : string
$method string
$args array
리턴 string

colour() 공개 정적인 메소드

返回格式化后的字符串
public static colour ( string $text, string | array | integer $foregroundColors = null, string | integer $backgroundColors = null ) : string
$text string 要着色的文本
$foregroundColors string | array | integer 前景色 eg: red、red+highlight、Colors::BLACK、[Colors::BLACK, Colors::HIGHLIGHT]
$backgroundColors string | integer 背景色
리턴 string

setNoAnsi() 공개 정적인 메소드

不输出 ansi字符
public static setNoAnsi ( )