PHP Class ConsoleKit\TextFormater

Afficher le fichier Open project: maximebf/consolekit Class Usage Examples

Méthodes publiques

Свойство Type Description
$defaultIndentWidth integer

Protected Properties

Свойство Type Description
$bgColor string
$fgColor string
$indent integer
$indentWidth integer
$quote string

Méthodes publiques

Méthode 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 méthode

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

apply() public static méthode

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

format() public méthode

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

getBgColor() public méthode

public getBgColor ( ) : string
Résultat string

getFgColor() public méthode

public getFgColor ( ) : string
Résultat string

getIndent() public méthode

public getIndent ( ) : integer
Résultat integer

getIndentWidth() public méthode

public getIndentWidth ( ) : integer
Résultat integer

getQuote() public méthode

public getQuote ( ) : string
Résultat string

setBgColor() public méthode

public setBgColor ( string $color ) : TextFormater
$color string
Résultat TextFormater

setFgColor() public méthode

public setFgColor ( string $color ) : TextFormater
$color string
Résultat TextFormater

setIndent() public méthode

public setIndent ( integer $indent ) : TextFormater
$indent integer
Résultat TextFormater

setIndentWidth() public méthode

public setIndentWidth ( $width ) : TextFormater
Résultat TextFormater

setOptions() public méthode

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

setQuote() public méthode

public setQuote ( string $quote ) : TextFormater
$quote string
Résultat TextFormater

Property Details

$bgColor protected_oe property

protected string $bgColor
Résultat string

$defaultIndentWidth public_oe static_oe property

public static int $defaultIndentWidth
Résultat integer

$fgColor protected_oe property

protected string $fgColor
Résultat string

$indent protected_oe property

protected int $indent
Résultat integer

$indentWidth protected_oe property

protected int $indentWidth
Résultat integer

$quote protected_oe property

protected string $quote
Résultat string