Library
Class

Library\CommandLine\Formater

class Formater

Constants

FORMAT_PATTERN

Mask used to identify a formated tag string like 'string'

Properties

$messages Written messages

Methods

__construct(array $options = array())

__toString()

__destruct()

addOption($option_name, $option_value)

setAutospaced($autospaced = null)

setForegroundColor($foreground = null)

setBackgroundColor($background = null)

setTextOption($option = null)

setMessage($text = null, $foreground = null, $background = null, $option = null)

newLine()

message($text = null, $foreground = null, $background = null, $option = null)

prompt($text = null, $default = null)

buildTaggedString($str, $type = null)

parse($message)

spacedStr($str, $type = null, $newLines = false)

format($text = null, $foreground = null, $background = null, $option = null)

fetch($display = true, $exit = false, $last_nl = true)

Details

at line 173
public __construct(array $options = array())

Parameters

array $options

at line 182
public __toString()

at line 187
public __destruct()

at line 193
public addOption($option_name, $option_value)

Parameters

$option_name
$option_value

at line 204
public setAutospaced($autospaced = null)

Parameters

$autospaced

at line 209
public setForegroundColor($foreground = null)

Parameters

$foreground

at line 216
public setBackgroundColor($background = null)

Parameters

$background

at line 223
public setTextOption($option = null)

Parameters

$option

at line 230
public setMessage($text = null, $foreground = null, $background = null, $option = null)

Parameters

$text
$foreground
$background
$option

at line 235
public newLine()

at line 244
public message($text = null, $foreground = null, $background = null, $option = null)

Parameters

$text
$foreground
$background
$option

at line 249
public prompt($text = null, $default = null)

Parameters

$text
$default

at line 262
public buildTaggedString($str, $type = null)

Parameters

$str
$type

at line 267
public parse($message)

Parameters

$message

at line 292
public spacedStr($str, $type = null, $newLines = false)

Parameters

$str
$type
$newLines

at line 307
public format($text = null, $foreground = null, $background = null, $option = null)

Parameters

$text
$foreground
$background
$option

at line 341
public fetch($display = true, $exit = false, $last_nl = true)

Parameters

$display
$exit
$last_nl