final class CachedManagementApiEdgeEntityControllerProxy in Apigee Edge 8
Management API specific cached entity controller implementation.
For those Management API controllers in Drupal that uses an entity cache to reduce the number of API calls sent by Drupal to Apigee Edge.
Hierarchy
- class \Drupal\apigee_edge\Entity\Controller\CachedManagementApiEdgeEntityControllerProxy implements EdgeEntityControllerInterface, EntityCacheAwareControllerInterface
Expanded class hierarchy of CachedManagementApiEdgeEntityControllerProxy
3 files declare their use of CachedManagementApiEdgeEntityControllerProxy
- ApiProductStorage.php in src/
Entity/ Storage/ ApiProductStorage.php - DeveloperStorage.php in src/
Entity/ Storage/ DeveloperStorage.php - TeamStorage.php in modules/
apigee_edge_teams/ src/ Entity/ Storage/ TeamStorage.php
File
- src/
Entity/ Controller/ CachedManagementApiEdgeEntityControllerProxy.php, line 32
Namespace
Drupal\apigee_edge\Entity\ControllerView source
final class CachedManagementApiEdgeEntityControllerProxy implements EdgeEntityControllerInterface, EntityCacheAwareControllerInterface {
/**
* The original cached entity controller.
*
* @var \Drupal\apigee_edge\Entity\Controller\EntityCacheAwareControllerInterface
*/
private $originalController;
/**
* The MGMT API proxy controller created from the original controller.
*
* @var \Drupal\apigee_edge\Entity\Controller\ManagementApiEdgeEntityControllerProxy
*/
private $proxiedController;
/**
* CachedManagementApiEdgeEntityControllerProxy constructor.
*
* @param \Drupal\apigee_edge\Entity\Controller\EntityCacheAwareControllerInterface $controller
* The entity controller that uses cache.
*/
public function __construct(EntityCacheAwareControllerInterface $controller) {
$this->originalController = $controller;
$this->proxiedController = new ManagementApiEdgeEntityControllerProxy($controller);
}
/**
* {@inheritdoc}
*/
public function create(EntityInterface $entity) : void {
$this->proxiedController
->create($entity);
}
/**
* {@inheritdoc}
*/
public function load(string $id) : EntityInterface {
return $this->proxiedController
->load($id);
}
/**
* {@inheritdoc}
*/
public function update(EntityInterface $entity) : void {
$this->proxiedController
->update($entity);
}
/**
* {@inheritdoc}
*/
public function delete(string $id) : void {
$this->proxiedController
->delete($id);
}
/**
* {@inheritdoc}
*/
public function loadAll() : array {
return $this->proxiedController
->loadAll();
}
/**
* {@inheritdoc}
*/
public function entityCache() : EntityCacheInterface {
return $this->originalController
->entityCache();
}
}