PHP 클래스 Colors\Color

파일 보기 프로젝트 열기: kevinlebrun/colors.php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$initial
$isStyleForced
$styles italic and blink may not work depending of your terminal
$userStyles
$wrapped

공개 메소드들

메소드 설명
__call ( $method, $args )
__construct ( $string = '' )
__get ( $name )
__invoke ( $string )
__toString ( )
apply ( $style, $text = null )
are256ColorsSupported ( )
bg ( $color, $text = null )
center ( $width = 80, $text = null )
clean ( $text = null )
colorize ( $text = null )
fg ( $color, $text = null )
highlight ( $color, $text = null )
isAValidStyleName ( $name )
isStyleForced ( )
isSupported ( ) : boolean Returns true if the stream supports colorization.
reset ( )
setForceStyle ( $force )
setTheme ( array $theme )
setUserStyles ( array $userStyles )
strip ( $text = null )

보호된 메소드들

메소드 설명
applyStyle ( $style, $text )
applyUserStyle ( $userStyle, $text )
buildEscSeq ( $style )
colorizeText ( $text )
isStyleExists ( $style )
isUserStyleExists ( $style )
replaceStyle ( $matches )
setInternalState ( $string )
shouldStylize ( )
stripColors ( $text )
stylize ( $style, $text )

메소드 상세

__call() 공개 메소드

public __call ( $method, $args )

__construct() 공개 메소드

public __construct ( $string = '' )

__get() 공개 메소드

public __get ( $name )

__invoke() 공개 메소드

public __invoke ( $string )

__toString() 공개 메소드

public __toString ( )

apply() 공개 메소드

public apply ( $style, $text = null )

applyStyle() 보호된 메소드

protected applyStyle ( $style, $text )

applyUserStyle() 보호된 메소드

protected applyUserStyle ( $userStyle, $text )

are256ColorsSupported() 공개 메소드

bg() 공개 메소드

public bg ( $color, $text = null )

buildEscSeq() 보호된 메소드

protected buildEscSeq ( $style )

center() 공개 메소드

public center ( $width = 80, $text = null )

clean() 공개 메소드

public clean ( $text = null )

colorize() 공개 메소드

public colorize ( $text = null )

colorizeText() 보호된 메소드

protected colorizeText ( $text )

fg() 공개 메소드

public fg ( $color, $text = null )

highlight() 공개 메소드

public highlight ( $color, $text = null )

isAValidStyleName() 공개 메소드

public isAValidStyleName ( $name )

isStyleExists() 보호된 메소드

protected isStyleExists ( $style )

isStyleForced() 공개 메소드

public isStyleForced ( )

isSupported() 공개 메소드

Colorization is disabled if not supported by the stream: - Windows without Ansicon, ConEmu or Babun - non tty consoles
public isSupported ( ) : boolean
리턴 boolean true if the stream supports colorization, false otherwise

isUserStyleExists() 보호된 메소드

protected isUserStyleExists ( $style )

replaceStyle() 보호된 메소드

protected replaceStyle ( $matches )

reset() 공개 메소드

public reset ( )

setForceStyle() 공개 메소드

public setForceStyle ( $force )

setInternalState() 보호된 메소드

protected setInternalState ( $string )

setTheme() 공개 메소드

사용 중단:
public setTheme ( array $theme )
$theme array

setUserStyles() 공개 메소드

public setUserStyles ( array $userStyles )
$userStyles array

shouldStylize() 보호된 메소드

protected shouldStylize ( )

strip() 공개 메소드

public strip ( $text = null )

stripColors() 보호된 메소드

protected stripColors ( $text )

stylize() 보호된 메소드

protected stylize ( $style, $text )

프로퍼티 상세

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

protected $initial

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

protected $isStyleForced

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

italic and blink may not work depending of your terminal
protected $styles

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

protected $userStyles

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

protected $wrapped