entity_load($entity_type, $ids = array(), $conditions = array(), $reset = FALSE)Load entities from the database.
This function should be used whenever you need to load more than one entity from the database. The entities are loaded into memory and will not require database access if loaded again during the same page request.
The actual loading is done through a class that has to implement the DrupalEntityController interface. By default, DrupalDefaultEntityController is used. Entity types can specify that a different class should be used by setting the 'controller class' key in hook_entity_info(). These classes can either implement the DrupalEntityController interface, or, most commonly, extend the DrupalDefaultEntityController class. See node_entity_info() and the NodeController in node.module as an example.
@see DrupalEntityController
DrupalDefaultEntityController
$entity_type The entity type to load, e.g. node or user.
$ids An array of entity IDs, or FALSE to load all entities.
$conditions An array of conditions in the form 'field' => $value.
$reset Whether to reset the internal cache for the requested entity type.
An array of entity objects indexed by their ids.
includes/common.inc, line 6382
<?php
function entity_load($entity_type, $ids = array(), $conditions = array(), $reset = FALSE) {
if ($reset) {
entity_get_controller($entity_type)->resetCache();
}
return entity_get_controller($entity_type)->load($ids, $conditions);
}
?>