|
| __construct (protected string readonly string $identifier, ?string $component='', mixed $a=null, protected string readonly ?string $lang=null,) |
| Constructs a lang_string object.
|
|
| __sleep () |
| Prepares the lang_string for sleep and stores only the forcedstring and string properties... the string cannot be regenerated so we need to ensure it is generated for this.
|
|
| __toString () |
| Magic __toString method for printing a string.
|
|
| get_component () |
| Returns the component.
|
|
| get_identifier () |
| Returns the identifier.
|
|
| out ($lang=null) |
| Returns the string.
|
|
|
static | __set_state (array $array) |
| Magic __set_state method used for var_export.
|
|
|
array stdClass mixed | $a = null |
| Any arguments required for the string.
|
|
string string | $component = '' |
| The strings component.
|
|
bool bool | $forcedstring = false |
| A special boolean.
|
|
string string | $string = null |
| The processed string (once processed)
|
|
◆ __construct()
core\lang_string::__construct |
( |
protected string readonly string | $identifier, |
|
|
?string | $component = '', |
|
|
mixed | $a = null, |
|
|
protected string readonly ?string | $lang = null ) |
Constructs a lang_string object.
This function should do as little processing as possible to ensure the best performance for strings that won't be used.
- Parameters
-
string | $identifier | The strings identifier |
string | null | $component | The strings component |
mixed | $a | Any arguments the string requires |
string | null | $lang | The language to use when processing the string. |
- Exceptions
-
- Parameters
-
$identifier | The strings identifier |
$lang | The language to use when processing the string |
◆ __set_state()
static core\lang_string::__set_state |
( |
array | $array | ) |
|
|
static |
Magic __set_state method used for var_export.
- Parameters
-
- Return values
-
◆ __sleep()
core\lang_string::__sleep |
( |
| ) |
|
Prepares the lang_string for sleep and stores only the forcedstring and string properties... the string cannot be regenerated so we need to ensure it is generated for this.
- Return values
-
◆ __toString()
core\lang_string::__toString |
( |
| ) |
|
Magic __toString method for printing a string.
- Return values
-
◆ get_component()
core\lang_string::get_component |
( |
| ) |
|
Returns the component.
- Return values
-
◆ get_identifier()
core\lang_string::get_identifier |
( |
| ) |
|
Returns the identifier.
- Return values
-
◆ get_string()
core\lang_string::get_string |
( |
| ) |
|
|
protected |
Processes the string.
This function actually processes the string, stores it in the string property and then returns it. You will notice that this function is VERY similar to the get_string method. That is because it is pretty much doing the same thing. However as this function is an upgrade it isn't as tolerant to backwards compatibility.
- Return values
-
- Exceptions
-
◆ out()
core\lang_string::out |
( |
| $lang = null | ) |
|
Returns the string.
- Parameters
-
string | $lang | The langauge to use when processing the string |
- Return values
-
◆ $a
array stdClass mixed core\lang_string::$a = null |
|
protected |
Any arguments required for the string.
Default null
◆ $component
string string core\lang_string::$component = '' |
|
protected |
The strings component.
Default ''
◆ $forcedstring
bool bool core\lang_string::$forcedstring = false |
|
protected |
A special boolean.
If set to true then the object has been woken up and cannot be regenerated. If this is set then $this->string MUST be used.
The documentation for this class was generated from the following file:
- lib/classes/lang_string.php