// load.
$ids =
array_keys(array_diff_key($flipped_ids,
$entities));
// Add pre-loaded entities to the cache.
$this->
setStaticCache($preloaded_entities);
} // Load any remaining entities from the database. This is the case if $ids
// is set to NULL (so we load all entities) or if there are any IDs left to
// load.
if ($ids === NULL ||
$ids) { $queried_entities =
$this->
doLoadMultiple($ids);
} // Pass all entities loaded from the database through $this->postLoad(),
// which attaches fields (if supported by the entity type) and calls the
// entity type specific load callback, for example hook_node_load().
if (!
empty($queried_entities)) { $this->
postLoad($queried_entities);
$entities +=
$queried_entities;
// Add queried entities to the cache.
$this->
setStaticCache($queried_entities);
}