Legend of the Green Dragon

Format
in package
Uses Code, Color

Format a string.

Table of Contents

$codePatternClose  : mixed
$codePatternOpen  : mixed
$codeReplacementClose  : mixed
$codeReplacementOpen  : mixed
$codes  : mixed
$codeSpecialClose  : mixed
$codeSpecialOpen  : mixed
$codeSpecialPatternClose  : mixed
$codeSpecialPatternOpen  : mixed
$codeSpecialReplacementClose  : mixed
$codeSpecialReplacementOpen  : mixed
$colorPatternClose  : mixed
$colorPatternOpen  : mixed
$colorReplacement  : mixed
$colors  : mixed
$dec_point  : string
Style of decimal point.
$thousands_sep  : string
Style of thousands point.
$translator  : mixed
__construct()  : mixed
colorize()  : mixed
This function puts the lotgd formatting `whatever into HTML tags.
getCodePatternClose()  : array<string|int, mixed>
Get patterns for close code tag.
getCodePatternOpen()  : array<string|int, mixed>
Get patterns for open code tag.
getCodeReplacementClose()  : mixed
Get replacement for code close code colors.
getCodeReplacementOpen()  : mixed
Get replacement for code open code colors.
getCodes()  : array<string|int, mixed>
Get the complete color array.
getCodeSpecialClose()  : array<string|int, mixed>
Get Specials for close code tag.
getCodeSpecialOpen()  : mixed
Get Special for code open code colors.
getCodeSpecialPatternClose()  : array<string|int, mixed>
Get patterns for close code tag.
getCodeSpecialPatternOpen()  : array<string|int, mixed>
Get patterns for open code tag.
getCodeSpecialReplacementClose()  : mixed
Get replacement for code close code colors.
getCodeSpecialReplacementOpen()  : mixed
Get replacement for code open code colors.
getColorPatternClose()  : array<string|int, mixed>
Get patterns for close color code.
getColorPatternOpen()  : array<string|int, mixed>
Get patterns for open color code.
getColorReplacementOpen()  : mixed
Get replacement for code open code colors.
getColors()  : array<string|int, mixed>
Get the complete color array.
messageFormatter()  : string
Only format a message with MessageFormatter.
mf()  : string
alias
numeral()  : string
Format a number.
relativedate()  : string
Show a relative date.
setDecPoint()  : mixed
Set decimal point.
setThousandsSep()  : mixed
Set thousands separation.
uncolorize()  : string
Full sanitize a string, removed color and codes.
cleanParameters()  : bool
Clean param of a value.

Properties

$codePatternClose

protected mixed $codePatternClose

$codePatternOpen

protected mixed $codePatternOpen

$codeReplacementClose

protected mixed $codeReplacementClose

$codeReplacementOpen

protected mixed $codeReplacementOpen

$codeSpecialClose

protected mixed $codeSpecialClose

$codeSpecialOpen

protected mixed $codeSpecialOpen

$codeSpecialPatternClose

protected mixed $codeSpecialPatternClose

$codeSpecialPatternOpen

protected mixed $codeSpecialPatternOpen

$codeSpecialReplacementClose

protected mixed $codeSpecialReplacementClose

$codeSpecialReplacementOpen

protected mixed $codeSpecialReplacementOpen

$colorPatternClose

protected mixed $colorPatternClose

$colorPatternOpen

protected mixed $colorPatternOpen

$colorReplacement

protected mixed $colorReplacement

$dec_point

Style of decimal point.

protected string $dec_point

$thousands_sep

Style of thousands point.

protected string $thousands_sep

$translator

protected mixed $translator

Methods

__construct()

public __construct(TranslatorInterface $translator, Code $code, Color $colors) : mixed
Parameters
$translator : TranslatorInterface
$code : Code
$colors : Color
Return values
mixed

colorize()

This function puts the lotgd formatting `whatever into HTML tags.

public colorize(string $string) : mixed
Parameters
$string : string

the LoTGD formatted string

Return values
mixed

getCodePatternClose()

Get patterns for close code tag.

public getCodePatternClose() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCodePatternOpen()

Get patterns for open code tag.

public getCodePatternOpen() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCodeReplacementClose()

Get replacement for code close code colors.

public getCodeReplacementClose() : mixed
Return values
mixed

getCodeReplacementOpen()

Get replacement for code open code colors.

public getCodeReplacementOpen() : mixed
Return values
mixed

getCodes()

Get the complete color array.

public getCodes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCodeSpecialClose()

Get Specials for close code tag.

public getCodeSpecialClose() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCodeSpecialOpen()

Get Special for code open code colors.

public getCodeSpecialOpen() : mixed
Return values
mixed

getCodeSpecialPatternClose()

Get patterns for close code tag.

public getCodeSpecialPatternClose() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCodeSpecialPatternOpen()

Get patterns for open code tag.

public getCodeSpecialPatternOpen() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCodeSpecialReplacementClose()

Get replacement for code close code colors.

public getCodeSpecialReplacementClose() : mixed
Return values
mixed

getCodeSpecialReplacementOpen()

Get replacement for code open code colors.

public getCodeSpecialReplacementOpen() : mixed
Return values
mixed

getColorPatternClose()

Get patterns for close color code.

public getColorPatternClose() : array<string|int, mixed>
Return values
array<string|int, mixed>

getColorPatternOpen()

Get patterns for open color code.

public getColorPatternOpen() : array<string|int, mixed>
Return values
array<string|int, mixed>

getColorReplacementOpen()

Get replacement for code open code colors.

public getColorReplacementOpen() : mixed
Return values
mixed

getColors()

Get the complete color array.

public getColors() : array<string|int, mixed>
Return values
array<string|int, mixed>

messageFormatter()

Only format a message with MessageFormatter.

public messageFormatter(string $message[, array<string|int, mixed>|null $parameters = [] ][, string|null $locale = null ]) : string
Parameters
$message : string
$parameters : array<string|int, mixed>|null = []
$locale : string|null = null
Return values
string

mf()

alias

public mf(string $message[, array<string|int, mixed>|null $parameters = [] ][, string|null $locale = null ]) : string
Parameters
$message : string
$parameters : array<string|int, mixed>|null = []
$locale : string|null = null
Return values
string

numeral()

Format a number.

public numeral(float|int $number, int $decimals[, string $dec_point = null ][, string $thousands_sep = null ]) : string
Parameters
$number : float|int
$decimals : int
$dec_point : string = null
$thousands_sep : string = null
Return values
string

relativedate()

Show a relative date.

public relativedate(mixed $indate[, string $default = 'never' ]) : string
Parameters
$indate : mixed
$default : string = 'never'
Return values
string

setDecPoint()

Set decimal point.

public setDecPoint(string $val) : mixed
Parameters
$val : string
Return values
mixed

setThousandsSep()

Set thousands separation.

public setThousandsSep(string $val) : mixed
Parameters
$val : string
Return values
mixed

uncolorize()

Full sanitize a string, removed color and codes.

public uncolorize(string $string) : string

All LoTGD codes included (i b `c) and others.

Parameters
$string : string
Return values
string

cleanParameters()

Clean param of a value.

private cleanParameters(mixed $param) : bool
Parameters
$param : mixed
Return values
bool

Search results