Legend of the Green Dragon

CoreFilter

Table of Contents

affirmationNegation()  : text
Show an affirmation or negation.
colorize()  : string
Colorize a string.
highlightFile()  : string|null
Syntax highlighting of a file.
highlightString()  : string|null
Syntax highlighting of a string.
numeral()  : string
Format a number.
preventCodes()  : string
Preven to format a LotGD code.
relativedate()  : string
Show a relative date from now.
sprintfnews()  : string
Similar to filter "format" but second argument is an array.

Methods

affirmationNegation()

Show an affirmation or negation.

public affirmationNegation(int|bool $value[, string $yes = 'adverb.yes' ][, string $no = 'adverb.no' ][, string $textDomain = 'app_common' ]) : text
Parameters
$value : int|bool

Value to check

$yes : string = 'adverb.yes'

Translation key

$no : string = 'adverb.no'

Translation key

$textDomain : string = 'app_common'

Domain for translation

Return values
text

colorize()

Colorize a string.

public colorize(string|null $string) : string
Parameters
$string : string|null
Return values
string

highlightFile()

Syntax highlighting of a file.

public highlightFile(string $file) : string|null
Parameters
$file : string
Return values
string|null

highlightString()

Syntax highlighting of a string.

public highlightString(string $string) : string|null
Parameters
$string : string
Return values
string|null

numeral()

Format a number.

public numeral(mixed $number, int|null $decimals) : string
Parameters
$number : mixed
$decimals : int|null
Return values
string

preventCodes()

Preven to format a LotGD code.

public preventCodes(string|null $string) : string
Parameters
$string : string|null
Return values
string

relativedate()

Show a relative date from now.

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

sprintfnews()

Similar to filter "format" but second argument is an array.

public sprintfnews(string $string, array<string|int, mixed> $arguments) : string
Parameters
$string : string
$arguments : array<string|int, mixed>
Return values
string

Search results