You are here

final class TeamAppControllerFactory in Apigee Edge 8

Company app controller factory.

Hierarchy

Expanded class hierarchy of TeamAppControllerFactory

1 string reference to 'TeamAppControllerFactory'
apigee_edge_teams.services.yml in modules/apigee_edge_teams/apigee_edge_teams.services.yml
modules/apigee_edge_teams/apigee_edge_teams.services.yml
1 service uses TeamAppControllerFactory
apigee_edge_teams.controller.team_app_controller_factory in modules/apigee_edge_teams/apigee_edge_teams.services.yml
Drupal\apigee_edge_teams\Entity\Controller\TeamAppControllerFactory

File

modules/apigee_edge_teams/src/Entity/Controller/TeamAppControllerFactory.php, line 32

Namespace

Drupal\apigee_edge_teams\Entity\Controller
View source
final class TeamAppControllerFactory implements TeamAppControllerFactoryInterface {

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

  /**
   * The SDK connector service.
   *
   * @var \Drupal\apigee_edge\SDKConnectorInterface
   */
  private $connector;

  /**
   * The organization controller service.
   *
   * @var \Drupal\apigee_edge\Entity\Controller\OrganizationControllerInterface
   */
  private $orgController;

  /**
   * The app cache that stores apps by their ids (UUIDs).
   *
   * @var \Drupal\apigee_edge\Entity\Controller\Cache\AppCacheInterface
   */
  private $appCache;

  /**
   * The app cache by owner factory service.
   *
   * @var \Drupal\apigee_edge\Entity\Controller\Cache\AppCacheByOwnerFactoryInterface
   */
  private $appCacheByOwnerFactory;

  /**
   * The app name cache by owner factory service.
   *
   * @var \Drupal\apigee_edge\Entity\Controller\Cache\AppNameCacheByOwnerFactoryInterface
   */
  private $appNameCacheByOwnerFactory;

  /**
   * DeveloperAppControllerFactory constructor.
   *
   * @param \Drupal\apigee_edge\SDKConnectorInterface $connector
   *   The SDK connector service.
   * @param \Drupal\apigee_edge\Entity\Controller\OrganizationControllerInterface $org_controller
   *   The organization controller service.
   * @param \Drupal\apigee_edge\Entity\Controller\Cache\AppCacheInterface $app_cache
   *   The app cache that stores apps by their ids (UUIDs).
   * @param \Drupal\apigee_edge\Entity\Controller\Cache\AppCacheByOwnerFactoryInterface $app_by_owner_app_cache_factory
   *   The app cache by owner factory service.
   * @param \Drupal\apigee_edge\Entity\Controller\Cache\AppNameCacheByOwnerFactoryInterface $app_by_owner_app_id_cache_factory
   *   The app name cache by owner factory service.
   */
  public function __construct(SDKConnectorInterface $connector, OrganizationControllerInterface $org_controller, AppCacheInterface $app_cache, AppCacheByOwnerFactoryInterface $app_by_owner_app_cache_factory, AppNameCacheByOwnerFactoryInterface $app_by_owner_app_id_cache_factory) {
    $this->connector = $connector;
    $this->orgController = $org_controller;
    $this->appCache = $app_cache;
    $this->appCacheByOwnerFactory = $app_by_owner_app_cache_factory;
    $this->appNameCacheByOwnerFactory = $app_by_owner_app_id_cache_factory;
  }

  /**
   * {@inheritdoc}
   */
  public function teamAppController(string $team) : TeamAppControllerInterface {
    if (!isset($this->instances[$team])) {
      $this->instances[$team] = new TeamAppController($team, $this->connector, $this->orgController, $this->appCache, $this->appCacheByOwnerFactory, $this->appNameCacheByOwnerFactory);
    }
    return $this->instances[$team];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TeamAppControllerFactory::$appCache private property The app cache that stores apps by their ids (UUIDs).
TeamAppControllerFactory::$appCacheByOwnerFactory private property The app cache by owner factory service.
TeamAppControllerFactory::$appNameCacheByOwnerFactory private property The app name cache by owner factory service.
TeamAppControllerFactory::$connector private property The SDK connector service.
TeamAppControllerFactory::$instances private property Internal cache for created instances.
TeamAppControllerFactory::$orgController private property The organization controller service.
TeamAppControllerFactory::teamAppController public function Returns a preconfigured team app controller. Overrides TeamAppControllerFactoryInterface::teamAppController
TeamAppControllerFactory::__construct public function DeveloperAppControllerFactory constructor.