The Clico Text class allows for text decorating for the CLI stdOut.
Text and backgrounds can be coloured; text weight can be set as well as Other effects such as blinking, highlighting, and underlining.
package | Default |
---|
__construct(String $string = null
)
Can optionally set the text on instantiation.
String
__toString() : string
string
b() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
background() : \Webbtj\Clico\Text
Direct future colour methods to affect the background colour.
\Webbtj\Clico\Text
black() : \Webbtj\Clico\Text
Set the colour (background or foreground) to black
\Webbtj\Clico\Text
blink() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
blue() : \Webbtj\Clico\Text
Set the colour (background or foreground) to blue
\Webbtj\Clico\Text
bold() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
cyan() : \Webbtj\Clico\Text
Set the colour (background or foreground) to cyan
\Webbtj\Clico\Text
dark() : \Webbtj\Clico\Text
Make future colour assignments their dark variant
\Webbtj\Clico\Text
darken() : \Webbtj\Clico\Text
Make the most recent colour assignment (background/foreground) its dark variant.
\Webbtj\Clico\Text
dim() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
flash() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
foreground() : \Webbtj\Clico\Text
Direct future colour methods to affect the foreground colour.
\Webbtj\Clico\Text
getText() : string
string
green() : \Webbtj\Clico\Text
Set the colour (background or foreground) to green
\Webbtj\Clico\Text
heavyWeight() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
hidden() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
hide() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
highlight() : \Webbtj\Clico\Text
Make the text highlighted (invert background and foregroune colours)
\Webbtj\Clico\Text
length() : integer
integer
light() : \Webbtj\Clico\Text
Make future colour assignments their light variant
\Webbtj\Clico\Text
lightWeight() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
lighten() : \Webbtj\Clico\Text
Make the most recent colour assignment (background/foreground) its light variant.
\Webbtj\Clico\Text
magenta() : \Webbtj\Clico\Text
Set the colour (background or foreground) to magenta
\Webbtj\Clico\Text
normal() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
normalWeight() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
rainbow() : string
string
red() : \Webbtj\Clico\Text
Set the colour (background or foreground) to red
\Webbtj\Clico\Text
repeat(integer $repeat) : \Webbtj\Clico\Text
integer
\Webbtj\Clico\Text
setDefault(boolean $setAll = false
) : \Webbtj\Clico\Text
Pass $setAll = true to set both the background and foreground colours to their default.
boolean
\Webbtj\Clico\Text
strong() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
testPattern(integer $width = 10
) : string
integer
string
text(String $string) : \Webbtj\Clico\Text
String
\Webbtj\Clico\Text
thin() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
u() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
underline() : \Webbtj\Clico\Text
\Webbtj\Clico\Text
white() : \Webbtj\Clico\Text
Set the colour (background or foreground) to white/grey
\Webbtj\Clico\Text
yellow() : \Webbtj\Clico\Text
Set the colour (background or foreground) to yellow
\Webbtj\Clico\Text
assignColour(integer $colour) : \Webbtj\Clico\Text
integer
\Webbtj\Clico\Text
colourMap() : Array
Array
$BACKGROUND_OPENED
'background'
$BG_DARK
40
$BG_DEFAULT
49
$BG_LIGHT
100
$BLINK
5
$DARK_SHADE
'dark'
$FG_DARK
30
$FG_DEFAULT
39
$FG_LIGHT
90
$FOREGROUND_OPENED
'foreground'
$HIDDEN
8
$HIGHLIGHT
7
$LIGHT_SHADE
'light'
$UNDERLINE
4
$WEIGHT_HEAVY
1
$WEIGHT_LIGHT
2
$WEIGHT_NORMAL
0
$background
$blink
$foreground
$hidden
$highlight
$opened
$repeat
1
$shade
$string
$underline
$weight