PHP Class kahlan\cli\Cli

Datei anzeigen Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Property Type Description
$_vt100 array ANSI/VT100 color/format sequences.
$_vtbackground string The default background color.
$_vtcolor string The default color.
$_vtstyle string The default style.

Public Methods

Method Description
bell ( integer $count = 1 ) Bells.
color ( mixed $string, string | array $options = null ) Return a VT100 colored string.

Protected Methods

Method Description
_vt100 ( mixed $name ) : integer Returns a ANSI/VT100 number from a color name.
_vtbackground ( mixed $name ) : integer Returns the ANSI/VT100 number from a backgound color name.
_vtcolor ( mixed $name ) : integer Returns the ANSI/VT100 number from a color name.
_vtstyle ( mixed $name ) : integer Returns a ANSI/VT100 number from a style name.

Method Details

_vt100() protected static method

Returns a ANSI/VT100 number from a color name.
protected static _vt100 ( mixed $name ) : integer
$name mixed A color name string or a ANSI/VT100 number.
return integer A ANSI/VT100 number.

_vtbackground() protected static method

Returns the ANSI/VT100 number from a backgound color name.
protected static _vtbackground ( mixed $name ) : integer
$name mixed A backgound color name string or a ANSI/VT100 number.
return integer A ANSI/VT100 number.

_vtcolor() protected static method

Returns the ANSI/VT100 number from a color name.
protected static _vtcolor ( mixed $name ) : integer
$name mixed A color name string or a ANSI/VT100 number.
return integer A ANSI/VT100 number.

_vtstyle() protected static method

Returns a ANSI/VT100 number from a style name.
protected static _vtstyle ( mixed $name ) : integer
$name mixed A style name string or a ANSI/VT100 number.
return integer A ANSI/VT100 number.

bell() public static method

Bells.
public static bell ( integer $count = 1 )
$count integer Number of times that the bells must ring.

color() public static method

Return a VT100 colored string.
public static color ( mixed $string, string | array $options = null )
$string mixed The string to color.
$options string | array The possible values for an array are: - `'style`: a style code. - `'color'`: a color code. - `'background'`: a background color code. The string must respect one of the following format: - `'style;color;background'`. - `'style;color'`. - `'color'`.

Property Details

$_vt100 protected_oe static_oe property

ANSI/VT100 color/format sequences.
protected static array $_vt100
return array

$_vtbackground protected_oe static_oe property

The default background color.
protected static string $_vtbackground
return string

$_vtcolor protected_oe static_oe property

The default color.
protected static string $_vtcolor
return string

$_vtstyle protected_oe static_oe property

The default style.
protected static string $_vtstyle
return string