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
stringb() : \Webbtj\Clico\Text
\Webbtj\Clico\Textbackground() : \Webbtj\Clico\Text
Direct future colour methods to affect the background colour.
\Webbtj\Clico\Textblack() : \Webbtj\Clico\Text
Set the colour (background or foreground) to black
\Webbtj\Clico\Textblink() : \Webbtj\Clico\Text
\Webbtj\Clico\Textblue() : \Webbtj\Clico\Text
Set the colour (background or foreground) to blue
\Webbtj\Clico\Textbold() : \Webbtj\Clico\Text
\Webbtj\Clico\Textcyan() : \Webbtj\Clico\Text
Set the colour (background or foreground) to cyan
\Webbtj\Clico\Textdark() : \Webbtj\Clico\Text
Make future colour assignments their dark variant
\Webbtj\Clico\Textdarken() : \Webbtj\Clico\Text
Make the most recent colour assignment (background/foreground) its dark variant.
\Webbtj\Clico\Textdim() : \Webbtj\Clico\Text
\Webbtj\Clico\Textflash() : \Webbtj\Clico\Text
\Webbtj\Clico\Textforeground() : \Webbtj\Clico\Text
Direct future colour methods to affect the foreground colour.
\Webbtj\Clico\TextgetText() : string
stringgreen() : \Webbtj\Clico\Text
Set the colour (background or foreground) to green
\Webbtj\Clico\TextheavyWeight() : \Webbtj\Clico\Text
\Webbtj\Clico\Texthidden() : \Webbtj\Clico\Text
\Webbtj\Clico\Texthide() : \Webbtj\Clico\Text
\Webbtj\Clico\Texthighlight() : \Webbtj\Clico\Text
Make the text highlighted (invert background and foregroune colours)
\Webbtj\Clico\Textlength() : integer
integerlight() : \Webbtj\Clico\Text
Make future colour assignments their light variant
\Webbtj\Clico\TextlightWeight() : \Webbtj\Clico\Text
\Webbtj\Clico\Textlighten() : \Webbtj\Clico\Text
Make the most recent colour assignment (background/foreground) its light variant.
\Webbtj\Clico\Textmagenta() : \Webbtj\Clico\Text
Set the colour (background or foreground) to magenta
\Webbtj\Clico\Textnormal() : \Webbtj\Clico\Text
\Webbtj\Clico\TextnormalWeight() : \Webbtj\Clico\Text
\Webbtj\Clico\Textrainbow() : string
stringred() : \Webbtj\Clico\Text
Set the colour (background or foreground) to red
\Webbtj\Clico\Textrepeat(integer $repeat) : \Webbtj\Clico\Text
integer
\Webbtj\Clico\TextsetDefault(boolean $setAll = false) : \Webbtj\Clico\Text
Pass $setAll = true to set both the background and foreground colours to their default.
boolean
\Webbtj\Clico\Textstrong() : \Webbtj\Clico\Text
\Webbtj\Clico\TexttestPattern(integer $width = 10) : string
integer
stringtext(String $string) : \Webbtj\Clico\Text
String
\Webbtj\Clico\Textthin() : \Webbtj\Clico\Text
\Webbtj\Clico\Textu() : \Webbtj\Clico\Text
\Webbtj\Clico\Textunderline() : \Webbtj\Clico\Text
\Webbtj\Clico\Textwhite() : \Webbtj\Clico\Text
Set the colour (background or foreground) to white/grey
\Webbtj\Clico\Textyellow() : \Webbtj\Clico\Text
Set the colour (background or foreground) to yellow
\Webbtj\Clico\TextassignColour(integer $colour) : \Webbtj\Clico\Text
integer
\Webbtj\Clico\TextcolourMap() : 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