You are here

public function AppCacheByOwner::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/AppCacheByOwner.php, line 126

Class

AppCacheByOwner
Default cache store for apps of a specific owner.

Namespace

Drupal\apigee_edge\Entity\Controller\Cache

Code

public function getEntity(string $id) : ?EntityInterface {
  $entities = $this
    ->getEntities([
    $id,
  ]);
  return $entities ? reset($entities) : NULL;
}