Elgg  Version 3.0
Static Public Member Functions | List of all members
Elgg\Values Class Reference

Functions for use as plugin hook/event handlers or other situations where you need a globally accessible callable. More...

Static Public Member Functions

static getTrue ()
 Return true. More...
 
static getFalse ()
 Return false. More...
 
static getNull ()
 Return null. More...
 
static getArray ()
 Return empty array. More...
 
static normalizeTimestamp ($time)
 Returns timestamp value of the time representation. More...
 
static normalizeTime ($time)
 Returns DateTime object based on time representation. More...
 
static normalizeIds (...$args)
 Prepare IDs. More...
 
static normalizeGuids (...$args)
 Flatten an array of data into an array of GUIDs. More...
 
static preventViewOutput ()
 Return array with __view_output set to prevent view output during view_vars hook. More...
 
static isEmpty ($value)
 Check if a value isn't empty, but allow 0 and '0'. More...
 

Detailed Description

Functions for use as plugin hook/event handlers or other situations where you need a globally accessible callable.

Definition at line 15 of file Values.php.

Member Function Documentation

static Elgg\Values::getArray ( )
static

Return empty array.

Returns
array
Since
1.12.0

Definition at line 52 of file Values.php.

static Elgg\Values::getFalse ( )
static

Return false.

Returns
false
Since
1.12.0

Definition at line 33 of file Values.php.

static Elgg\Values::getNull ( )
static

Return null.

Returns
null
Since
1.12.0

Definition at line 43 of file Values.php.

static Elgg\Values::getTrue ( )
static

Return true.

Returns
true
Since
1.12.0

Definition at line 23 of file Values.php.

static Elgg\Values::isEmpty (   $value)
static

Check if a value isn't empty, but allow 0 and '0'.

Parameters
mixed$valuethe value to check
See also
empty()
Returns
bool
Since
3.0.0

Definition at line 189 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
DataFormatException

Definition at line 139 of file Values.php.

static Elgg\Values::normalizeIds (   $args)
static

Prepare IDs.

Parameters
array...$args IDs
Returns
int[]
Exceptions
DataFormatException

Definition at line 103 of file Values.php.

static Elgg\Values::normalizeTime (   $time)
static

Returns DateTime object based on time representation.

Parameters
\DateTime | \Elgg\I18n\DateTime | string | int$timeTime
Returns
Exceptions
DataFormatException

Definition at line 76 of file Values.php.

static Elgg\Values::normalizeTimestamp (   $time)
static

Returns timestamp value of the time representation.

Parameters
\DateTime | \Elgg\I18n\DateTime | string | int$timeTime
Returns
int
Exceptions
DataFormatException

Definition at line 64 of file Values.php.

static Elgg\Values::preventViewOutput ( )
static

Return array with __view_output set to prevent view output during view_vars hook.

See also
ViewsService->renderView()
Returns
array
Since
3.0

Definition at line 175 of file Values.php.


The documentation for this class was generated from the following file: