PHP Класс Webmozart\Console\Api\Formatter\Style

С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $tag = null ) Creates a style.
bg ( string $color ) : static Sets the background color.
bgBlack ( ) : static Sets the background color to black.
bgBlue ( ) : static Sets the background color to blue.
bgCyan ( ) : static Sets the background color to cyan.
bgDefault ( ) : static Resets the background color to the system's default.
bgGreen ( ) : static Sets the background color to green.
bgMagenta ( ) : static Sets the background color to magenta.
bgRed ( ) : static Sets the background color to red.
bgWhite ( ) : static Sets the background color to white.
bgYellow ( ) : static Sets the background color to yellow.
blinking ( ) : static Enables blinking.
bold ( ) : static Sets the font weight to bold.
fg ( string $color ) : static Sets the foreground color.
fgBlack ( ) : static Sets the foreground color to black.
fgBlue ( ) : static Sets the foreground color to blue.
fgCyan ( ) : static Sets the foreground color to cyan.
fgDefault ( ) : static Resets the foreground color to the system's default.
fgGreen ( ) : static Sets the foreground color to green.
fgMagenta ( ) : static Sets the foreground color to magenta.
fgRed ( ) : static Sets the foreground color to red.
fgWhite ( ) : static Sets the foreground color to white.
fgYellow ( ) : static Sets the foreground color to yellow.
getBackgroundColor ( ) : string Returns the background color.
getForegroundColor ( ) : string Returns the foreground color.
getTag ( ) : string Returns the style's tag name.
hidden ( ) : static Hides the text.
inverse ( ) : static Enables inverse colors.
isBlinking ( ) : boolean Returns whether the text is blinking.
isBold ( ) : boolean Returns whether the text is bold.
isHidden ( ) : boolean Returns whether the text is concealed.
isInverse ( ) : boolean Returns whether the text is reversed.
isUnderlined ( ) : boolean Returns whether the text is underlined.
noTag ( ) : static Creates a style without a tag name.
notBlinking ( ) : static Disables blinking.
notBold ( ) : static Sets the font weight to normal.
notHidden ( ) : static Does not hide the text.
notInverse ( ) : static Disables inverse colors.
notUnderlined ( ) : static Disables underlining.
tag ( string $tag ) : static Creates a style with the given tag name.
underlined ( ) : static Enables underlining.

Описание методов

__construct() публичный Метод

Creates a style.
public __construct ( string $tag = null )
$tag string The tag name.

bg() публичный Метод

Sets the background color.
public bg ( string $color ) : static
$color string One of the color constants.
Результат static The current instance.

bgBlack() публичный Метод

Sets the background color to black.
public bgBlack ( ) : static
Результат static The current instance.

bgBlue() публичный Метод

Sets the background color to blue.
public bgBlue ( ) : static
Результат static The current instance.

bgCyan() публичный Метод

Sets the background color to cyan.
public bgCyan ( ) : static
Результат static The current instance.

bgDefault() публичный Метод

Resets the background color to the system's default.
public bgDefault ( ) : static
Результат static The current instance.

bgGreen() публичный Метод

Sets the background color to green.
public bgGreen ( ) : static
Результат static The current instance.

bgMagenta() публичный Метод

Sets the background color to magenta.
public bgMagenta ( ) : static
Результат static The current instance.

bgRed() публичный Метод

Sets the background color to red.
public bgRed ( ) : static
Результат static The current instance.

bgWhite() публичный Метод

Sets the background color to white.
public bgWhite ( ) : static
Результат static The current instance.

bgYellow() публичный Метод

Sets the background color to yellow.
public bgYellow ( ) : static
Результат static The current instance.

blinking() публичный Метод

Enables blinking.
public blinking ( ) : static
Результат static The current instance.

bold() публичный Метод

Sets the font weight to bold.
public bold ( ) : static
Результат static The current instance.

fg() публичный Метод

Sets the foreground color.
public fg ( string $color ) : static
$color string One of the color constants.
Результат static The current instance.

fgBlack() публичный Метод

Sets the foreground color to black.
public fgBlack ( ) : static
Результат static The current instance.

fgBlue() публичный Метод

Sets the foreground color to blue.
public fgBlue ( ) : static
Результат static The current instance.

fgCyan() публичный Метод

Sets the foreground color to cyan.
public fgCyan ( ) : static
Результат static The current instance.

fgDefault() публичный Метод

Resets the foreground color to the system's default.
public fgDefault ( ) : static
Результат static The current instance.

fgGreen() публичный Метод

Sets the foreground color to green.
public fgGreen ( ) : static
Результат static The current instance.

fgMagenta() публичный Метод

Sets the foreground color to magenta.
public fgMagenta ( ) : static
Результат static The current instance.

fgRed() публичный Метод

Sets the foreground color to red.
public fgRed ( ) : static
Результат static The current instance.

fgWhite() публичный Метод

Sets the foreground color to white.
public fgWhite ( ) : static
Результат static The current instance.

fgYellow() публичный Метод

Sets the foreground color to yellow.
public fgYellow ( ) : static
Результат static The current instance.

getBackgroundColor() публичный Метод

Returns the background color.
public getBackgroundColor ( ) : string
Результат string One of the color constants or `null` if the system's default should be used.

getForegroundColor() публичный Метод

Returns the foreground color.
public getForegroundColor ( ) : string
Результат string One of the color constants or `null` if the system's default should be used.

getTag() публичный Метод

Returns the style's tag name.
public getTag ( ) : string
Результат string The tag name or `null` if the style has no tag.

hidden() публичный Метод

Hides the text.
public hidden ( ) : static
Результат static The current instance.

inverse() публичный Метод

Enables inverse colors.
public inverse ( ) : static
Результат static The current instance.

isBlinking() публичный Метод

Returns whether the text is blinking.
public isBlinking ( ) : boolean
Результат boolean Returns `true` if text is formatted blinking and `false` otherwise.

isBold() публичный Метод

Returns whether the text is bold.
public isBold ( ) : boolean
Результат boolean Returns `true` if text is formatted bold and `false` otherwise.

isHidden() публичный Метод

Returns whether the text is concealed.
public isHidden ( ) : boolean
Результат boolean Returns `true` if text is formatted concealed and `false` otherwise.

isInverse() публичный Метод

Returns whether the text is reversed.
public isInverse ( ) : boolean
Результат boolean Returns `true` if text is formatted reversed and `false` otherwise.

isUnderlined() публичный Метод

Returns whether the text is underlined.
public isUnderlined ( ) : boolean
Результат boolean Returns `true` if text is formatted underlined and `false` otherwise.

noTag() публичный статический Метод

Creates a style without a tag name.
См. также: tag()
public static noTag ( ) : static
Результат static The created style.

notBlinking() публичный Метод

Disables blinking.
public notBlinking ( ) : static
Результат static The current instance.

notBold() публичный Метод

Sets the font weight to normal.
public notBold ( ) : static
Результат static The current instance.

notHidden() публичный Метод

Does not hide the text.
public notHidden ( ) : static
Результат static The current instance.

notInverse() публичный Метод

Disables inverse colors.
public notInverse ( ) : static
Результат static The current instance.

notUnderlined() публичный Метод

Disables underlining.
public notUnderlined ( ) : static
Результат static The current instance.

tag() публичный статический Метод

Creates a style with the given tag name.
См. также: noTag()
public static tag ( string $tag ) : static
$tag string The tag name.
Результат static The created style.

underlined() публичный Метод

Enables underlining.
public underlined ( ) : static
Результат static The current instance.