PHP 클래스 ConsoleKit\TextFormater

파일 보기 프로젝트 열기: maximebf/consolekit 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaultIndentWidth integer

보호된 프로퍼티들

프로퍼티 타입 설명
$bgColor string
$fgColor string
$indent integer
$indentWidth integer
$quote string

공개 메소드들

메소드 설명
__construct ( array $options = [] )
apply ( string $text, array $options = [] ) : string Returns the text formated with the specified options
format ( string $text ) Formats $text according to the formater's options
getBgColor ( ) : string
getFgColor ( ) : string
getIndent ( ) : integer
getIndentWidth ( ) : integer
getQuote ( ) : string
setBgColor ( string $color ) : TextFormater
setFgColor ( string $color ) : TextFormater
setIndent ( integer $indent ) : TextFormater
setIndentWidth ( $width ) : TextFormater
setOptions ( array $options ) : TextFormater Available options: - indentWidth - indent - quote - fgcolor - bgcolor
setQuote ( string $quote ) : TextFormater

메소드 상세

__construct() 공개 메소드

public __construct ( array $options = [] )
$options array

apply() 공개 정적인 메소드

Returns the text formated with the specified options
public static apply ( string $text, array $options = [] ) : string
$text string
$options array
리턴 string

format() 공개 메소드

Formats $text according to the formater's options
public format ( string $text )
$text string

getBgColor() 공개 메소드

public getBgColor ( ) : string
리턴 string

getFgColor() 공개 메소드

public getFgColor ( ) : string
리턴 string

getIndent() 공개 메소드

public getIndent ( ) : integer
리턴 integer

getIndentWidth() 공개 메소드

public getIndentWidth ( ) : integer
리턴 integer

getQuote() 공개 메소드

public getQuote ( ) : string
리턴 string

setBgColor() 공개 메소드

public setBgColor ( string $color ) : TextFormater
$color string
리턴 TextFormater

setFgColor() 공개 메소드

public setFgColor ( string $color ) : TextFormater
$color string
리턴 TextFormater

setIndent() 공개 메소드

public setIndent ( integer $indent ) : TextFormater
$indent integer
리턴 TextFormater

setIndentWidth() 공개 메소드

public setIndentWidth ( $width ) : TextFormater
리턴 TextFormater

setOptions() 공개 메소드

Available options: - indentWidth - indent - quote - fgcolor - bgcolor
public setOptions ( array $options ) : TextFormater
$options array
리턴 TextFormater

setQuote() 공개 메소드

public setQuote ( string $quote ) : TextFormater
$quote string
리턴 TextFormater

프로퍼티 상세

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

protected string $bgColor
리턴 string

$defaultIndentWidth 공개적으로 정적으로 프로퍼티

public static int $defaultIndentWidth
리턴 integer

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

protected string $fgColor
리턴 string

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

protected int $indent
리턴 integer

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

protected int $indentWidth
리턴 integer

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

protected string $quote
리턴 string