Convert
Class providing variable type and value conversion functions.
Tags
Table of Contents
- debug() : mixed
- Displays a variable.
- get_arrow() : array<string|int, mixed>|string
- Get an HTML array short code depending on Arrow-Array key index.
- index() : string
- Converts an integer into the user-defined counter style for the footnotes.
- to_bool() : bool
- Converts a string depending on its value to a boolean.
- to_arabic_leading() : string
- Converts an integer to a leading-0 integer.
- to_latin() : string
- Converts an integer into Latin ASCII characters, either lower or upper-case.
- to_romanic() : string
- Converts an integer to a Roman numeral.
Methods
debug()
Displays a variable.
public
static debug(mixed $p_mixed_value) : mixed
Parameters
- $p_mixed_value : mixed
-
The variable to display.
Tags
Return values
mixed —get_arrow()
Get an HTML array short code depending on Arrow-Array key index.
public
static get_arrow([int $p_int_index = -1 ]) : array<string|int, mixed>|string
Parameters
- $p_int_index : int = -1
-
Index representing the arrow. If empty, all arrows are specified.
Tags
Return values
array<string|int, mixed>|string —Array of all arrows if index is empty, otherwise HTML tag of a specific arrow.
index()
Converts an integer into the user-defined counter style for the footnotes.
public
static index(int $p_int_index[, string $p_str_convert_style = 'arabic_plain' ]) : string
Parameters
- $p_int_index : int
-
Index to be converted.
- $p_str_convert_style : string = 'arabic_plain'
-
Counter style to use.
Tags
Return values
string —Converted Index converted to the defined counter style.
to_bool()
Converts a string depending on its value to a boolean.
public
static to_bool(string $p_str_value) : bool
Parameters
- $p_str_value : string
-
String to be converted to boolean.
Tags
Return values
bool —Boolean value represented by the string.
to_arabic_leading()
Converts an integer to a leading-0 integer.
private
static to_arabic_leading(int $p_int_value) : string
Parameters
- $p_int_value : int
-
Value to be converted.
Tags
Return values
string —Value with a leading zero.
to_latin()
Converts an integer into Latin ASCII characters, either lower or upper-case.
private
static to_latin(int $p_int_value, bool $p_bool_upper_case) : string
This function works from values A–ZZ (meaning there is a limit of 676 gootnotes per Page).
Parameters
- $p_int_value : int
-
Value to be converted.
- $p_bool_upper_case : bool
-
Whether to convert the value to upper-case.
Tags
Return values
string —to_romanic()
Converts an integer to a Roman numeral.
private
static to_romanic(int $p_int_value, bool $p_bool_upper_case) : string
Parameters
- $p_int_value : int
-
Value to be converted.
- $p_bool_upper_case : bool
-
Whether to convert the value to upper-case.