PHP Класс ConsoleKit\TextFormater

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$defaultIndentWidth integer

Защищенные свойства (Protected)

Свойство Тип Описание
$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