You are here

final class AppNameCacheByOwnerFactory in Apigee Edge 8

Base definition of the app name cache service by app owner.

Hierarchy

Expanded class hierarchy of AppNameCacheByOwnerFactory

1 string reference to 'AppNameCacheByOwnerFactory'
apigee_edge.services.yml in ./apigee_edge.services.yml
apigee_edge.services.yml
1 service uses AppNameCacheByOwnerFactory
apigee_edge.entity.controller.cache.app_name_cache_by_owner_factory in ./apigee_edge.services.yml
Drupal\apigee_edge\Entity\Controller\Cache\AppNameCacheByOwnerFactory

File

src/Entity/Controller/Cache/AppNameCacheByOwnerFactory.php, line 26

Namespace

Drupal\apigee_edge\Entity\Controller\Cache
View source
final class AppNameCacheByOwnerFactory implements AppNameCacheByOwnerFactoryInterface {

  /**
   * Internal cache for created instances.
   *
   * @var \Drupal\apigee_edge\Entity\Controller\Cache\EntityIdCacheInterface[]
   */
  private $instances = [];

  /**
   * {@inheritdoc}
   */
  public function getAppNameCache(string $owner) : EntityIdCacheInterface {
    if (!isset($this->instances[$owner])) {
      $this->instances[$owner] = new EntityIdCache();
    }
    return $this->instances[$owner];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AppNameCacheByOwnerFactory::$instances private property Internal cache for created instances.
AppNameCacheByOwnerFactory::getAppNameCache public function Returns the same app name cache instance for an owner. Overrides AppNameCacheByOwnerFactoryInterface::getAppNameCache