PHP Class kahlan\cli\Cli

Afficher le fichier Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Свойство 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.

Méthodes publiques

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

Méthodes protégées

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

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.
Résultat integer A ANSI/VT100 number.

_vtbackground() protected static méthode

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.
Résultat integer A ANSI/VT100 number.

_vtcolor() protected static méthode

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.
Résultat integer A ANSI/VT100 number.

_vtstyle() protected static méthode

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.
Résultat integer A ANSI/VT100 number.

bell() public static méthode

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

color() public static méthode

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
Résultat array

$_vtbackground protected_oe static_oe property

The default background color.
protected static string $_vtbackground
Résultat string

$_vtcolor protected_oe static_oe property

The default color.
protected static string $_vtcolor
Résultat string

$_vtstyle protected_oe static_oe property

The default style.
protected static string $_vtstyle
Résultat string