Elgg  Version 1.10
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Elgg\EntityPreloader Class Reference

Public Member Functions

 __construct (array $guid_properties)
 Configure the preloader to check these properties of fetched objects for GUIDs. More...
 
 preload ($objects)
 Preload entities based on the given objects. More...
 

Public Attributes

 $_callable_cache_checker = '_elgg_retrieve_cached_entity'
 DO NOT USE. More...
 
 $_callable_entity_loader = 'elgg_get_entities'
 DO NOT USE. More...
 

Protected Member Functions

 getGuidsToLoad ($objects)
 Get GUIDs that need to be loaded. More...
 

Protected Attributes

 $properties
 

Detailed Description

Definition at line 12 of file EntityPreloader.php.

Constructor & Destructor Documentation

Elgg\EntityPreloader::__construct ( array  $guid_properties)

Configure the preloader to check these properties of fetched objects for GUIDs.

Parameters
array$guid_propertiese.g. array("owner_guid")

Definition at line 24 of file EntityPreloader.php.

Member Function Documentation

Elgg\EntityPreloader::getGuidsToLoad (   $objects)
protected

Get GUIDs that need to be loaded.

To simplify the user API, this function accepts non-arrays and arrays containing non-objects

Parameters
object[]$objects Objects from which to pluck GUIDs
Returns
int[]

Definition at line 54 of file EntityPreloader.php.

Elgg\EntityPreloader::preload (   $objects)

Preload entities based on the given objects.

Parameters
object[]$objects Objects–e.g. loaded from an Elgg query–from which we can pluck GUIDs to preload
Returns
void

Definition at line 35 of file EntityPreloader.php.

Member Data Documentation

Elgg\EntityPreloader::$_callable_cache_checker = '_elgg_retrieve_cached_entity'

DO NOT USE.

For unit test mocking private

Definition at line 79 of file EntityPreloader.php.

Elgg\EntityPreloader::$_callable_entity_loader = 'elgg_get_entities'

DO NOT USE.

For unit test mocking private

Definition at line 85 of file EntityPreloader.php.

Elgg\EntityPreloader::$properties
protected

Definition at line 17 of file EntityPreloader.php.


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