You are here

final class TeamAppCredentialControllerFactory in Apigee Edge 8

The team app credential controller factory.

Hierarchy

Expanded class hierarchy of TeamAppCredentialControllerFactory

1 string reference to 'TeamAppCredentialControllerFactory'
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 TeamAppCredentialControllerFactory
apigee_edge_teams.controller.team_app_credential_controller_factory in modules/apigee_edge_teams/apigee_edge_teams.services.yml
Drupal\apigee_edge_teams\Entity\Controller\TeamAppCredentialControllerFactory

File

modules/apigee_edge_teams/src/Entity/Controller/TeamAppCredentialControllerFactory.php, line 30

Namespace

Drupal\apigee_edge_teams\Entity\Controller
View source
final class TeamAppCredentialControllerFactory implements TeamAppCredentialControllerFactoryInterface {

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

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

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

  /**
   * The event dispatcher service.
   *
   * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
   */
  private $eventDispatcher;

  /**
   * TeamAppCredentialControllerFactory constructor.
   *
   * @param \Drupal\apigee_edge\SDKConnectorInterface $connector
   *   The SDK connector service.
   * @param \Drupal\apigee_edge\Entity\Controller\Cache\AppCacheByOwnerFactoryInterface $app_cache_by_owner_factory
   *   The app cache by owner factory service.
   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
   *   The event dispatcher service.
   */
  public function __construct(SDKConnectorInterface $connector, AppCacheByOwnerFactoryInterface $app_cache_by_owner_factory, EventDispatcherInterface $event_dispatcher) {
    $this->connector = $connector;
    $this->eventDispatcher = $event_dispatcher;
    $this->appCacheByOwnerFactory = $app_cache_by_owner_factory;
  }

  /**
   * {@inheritdoc}
   */
  public function teamAppCredentialController(string $owner, string $app_name) : TeamAppCredentialControllerInterface {
    if (!isset($this->instances[$owner][$app_name])) {
      $this->instances[$owner][$app_name] = new TeamAppCredentialController($owner, $app_name, $this->connector, $this->appCacheByOwnerFactory, $this->eventDispatcher);
    }
    return $this->instances[$owner][$app_name];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TeamAppCredentialControllerFactory::$appCacheByOwnerFactory private property The app cache by owner factory service.
TeamAppCredentialControllerFactory::$connector private property The SDK connector service.
TeamAppCredentialControllerFactory::$eventDispatcher private property The event dispatcher service.
TeamAppCredentialControllerFactory::$instances private property Internal cache for created instances.
TeamAppCredentialControllerFactory::teamAppCredentialController public function Returns a preconfigured controller for the owner's app. Overrides TeamAppCredentialControllerFactoryInterface::teamAppCredentialController
TeamAppCredentialControllerFactory::__construct public function TeamAppCredentialControllerFactory constructor.