Functions for use as event handlers or other situations where you need a globally accessible callable.
More...
Functions for use as event handlers or other situations where you need a globally accessible callable.
Definition at line 13 of file Values.php.
static Elgg\Values::getArray |
( |
| ) |
|
|
static |
Return empty array.
- Returns
- array
- Since
- 1.12.0
Definition at line 51 of file Values.php.
static Elgg\Values::getFalse |
( |
| ) |
|
|
static |
Return false.
- Returns
- false
- Since
- 1.12.0
Definition at line 31 of file Values.php.
static Elgg\Values::getNull |
( |
| ) |
|
|
static |
Return null.
- Returns
- null
- Since
- 1.12.0
Definition at line 41 of file Values.php.
static Elgg\Values::getTrue |
( |
| ) |
|
|
static |
Return true.
- Returns
- true
- Since
- 1.12.0
Definition at line 21 of file Values.php.
static Elgg\Values::isEmpty |
( |
|
$value | ) |
|
|
static |
Check if a value isn't empty, but allow 0 and '0'.
- Parameters
-
mixed | $value | the value to check |
- See also
- empty()
- Returns
- bool
- Since
- 3.0.0
Definition at line 192 of file Values.php.
static Elgg\Values::normalizeGuids |
( |
|
$args | ) |
|
|
static |
Flatten an array of data into an array of GUIDs.
- Parameters
-
mixed | ...$args Elements to normalize |
- Returns
- int[]|null
- Exceptions
-
Definition at line 141 of file Values.php.
static Elgg\Values::normalizeIds |
( |
|
$args | ) |
|
|
static |
Prepare IDs.
- Parameters
-
- Returns
- int[]
- Exceptions
-
Definition at line 104 of file Values.php.
static Elgg\Values::normalizeTime |
( |
|
$time | ) |
|
|
static |
Returns DateTime object based on time representation.
- Parameters
-
\DateTime | \Elgg\I18n\DateTime | string | int | $time | Time |
- Returns
- Exceptions
-
Definition at line 75 of file Values.php.
static Elgg\Values::normalizeTimestamp |
( |
|
$time | ) |
|
|
static |
Returns timestamp value of the time representation.
- Parameters
-
\DateTime | \Elgg\I18n\DateTime | string | int | $time | Time |
- Returns
- int
- Exceptions
-
Definition at line 63 of file Values.php.
static Elgg\Values::preventViewOutput |
( |
| ) |
|
|
static |
Return array with __view_output set to prevent view output during view_vars event.
- See also
- ViewsService->renderView()
- Returns
- array
- Since
- 3.0
Definition at line 178 of file Values.php.
static Elgg\Values::shortFormatOutput |
( |
|
$n, |
|
|
|
$precision = 0 |
|
) |
| |
|
static |
Use to convert large positive numbers in to short form like 1K, 1M, 1B or 1T Example: shortFormatOutput(7201); // Output: 7K Example: shortFormatOutput(7201,1); // Output: 7.2K.
- Parameters
-
mixed | $n | input integer or string |
int | $precision | number of digits in decimal place (default = 0) |
- Returns
- string|int
- Since
- 3.1
Definition at line 211 of file Values.php.
The documentation for this class was generated from the following file: