PHP Class ConsoleKit\TextFormater

Datei anzeigen Open project: maximebf/consolekit Class Usage Examples

Public Properties

Property Type Description
$defaultIndentWidth integer

Protected Properties

Property Type Description
$bgColor string
$fgColor string
$indent integer
$indentWidth integer
$quote string

Public Methods

Method Description
__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

Method Details

__construct() public method

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

apply() public static method

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

format() public method

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

getBgColor() public method

public getBgColor ( ) : string
return string

getFgColor() public method

public getFgColor ( ) : string
return string

getIndent() public method

public getIndent ( ) : integer
return integer

getIndentWidth() public method

public getIndentWidth ( ) : integer
return integer

getQuote() public method

public getQuote ( ) : string
return string

setBgColor() public method

public setBgColor ( string $color ) : TextFormater
$color string
return TextFormater

setFgColor() public method

public setFgColor ( string $color ) : TextFormater
$color string
return TextFormater

setIndent() public method

public setIndent ( integer $indent ) : TextFormater
$indent integer
return TextFormater

setIndentWidth() public method

public setIndentWidth ( $width ) : TextFormater
return TextFormater

setOptions() public method

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

setQuote() public method

public setQuote ( string $quote ) : TextFormater
$quote string
return TextFormater

Property Details

$bgColor protected_oe property

protected string $bgColor
return string

$defaultIndentWidth public_oe static_oe property

public static int $defaultIndentWidth
return integer

$fgColor protected_oe property

protected string $fgColor
return string

$indent protected_oe property

protected int $indent
return integer

$indentWidth protected_oe property

protected int $indentWidth
return integer

$quote protected_oe property

protected string $quote
return string