PHP Class Elgg\EntityPreloader

Afficher le fichier Open project: elgg/elgg

Méthodes publiques

Свойство Type Description
$_callable_cache_checker DO NOT USE. For unit test mocking
$_callable_entity_loader DO NOT USE. For unit test mocking

Méthodes publiques

Méthode Description
__construct ( EntityCache $entity_cache, EntityTable $entity_table ) Constructor
preload ( object[] $objects, array $guid_properties ) : void Preload entities based on the given objects

Méthodes protégées

Méthode Description
getGuidsToLoad ( object[] $objects, array $guid_properties ) : int[] Get GUIDs that need to be loaded

Method Details

__construct() public méthode

Constructor
public __construct ( EntityCache $entity_cache, EntityTable $entity_table )
$entity_cache Elgg\Cache\EntityCache Entity cache
$entity_table Elgg\Database\EntityTable Entity service

getGuidsToLoad() protected méthode

To simplify the user API, this function accepts non-arrays and arrays containing non-objects
protected getGuidsToLoad ( object[] $objects, array $guid_properties ) : int[]
$objects object[] Objects from which to pluck GUIDs
$guid_properties array e.g. array("owner_guid")
Résultat int[]

preload() public méthode

Preload entities based on the given objects
public preload ( object[] $objects, array $guid_properties ) : void
$objects object[] Objects--e.g. loaded from an Elgg query--from which we can pluck GUIDs to preload
$guid_properties array e.g. array("owner_guid")
Résultat void

Property Details

$_callable_cache_checker public_oe property

DO NOT USE. For unit test mocking
public $_callable_cache_checker

$_callable_entity_loader public_oe property

DO NOT USE. For unit test mocking
public $_callable_entity_loader