final public function EntityCache::getEntity in Apigee Edge 8
Returns an entity from the cache by its id.
Parameters
string $id: Entity id.
Return value
\Apigee\Edge\Entity\EntityInterface|null The entity if it is in the cache, null otherwise.
Overrides EntityCacheInterface::getEntity
File
- src/
Entity/ Controller/ Cache/ EntityCache.php, line 151
Class
- EntityCache
- Default entity cache implementation for controllers.
Namespace
Drupal\apigee_edge\Entity\Controller\CacheCode
public final function getEntity(string $id) : ?EntityInterface {
$entities = $this
->getEntities([
$id,
]);
return $entities ? reset($entities) : NULL;
}