You are here

final class DeveloperAppCredentialControllerFactory in Apigee Edge 8

The developer app credential controller factory.

Hierarchy

Expanded class hierarchy of DeveloperAppCredentialControllerFactory

1 string reference to 'DeveloperAppCredentialControllerFactory'
apigee_edge.services.yml in ./apigee_edge.services.yml
apigee_edge.services.yml
1 service uses DeveloperAppCredentialControllerFactory
apigee_edge.controller.developer_app_credential_factory in ./apigee_edge.services.yml
Drupal\apigee_edge\Entity\Controller\DeveloperAppCredentialControllerFactory

File

src/Entity/Controller/DeveloperAppCredentialControllerFactory.php, line 30

Namespace

Drupal\apigee_edge\Entity\Controller
View source
final class DeveloperAppCredentialControllerFactory implements DeveloperAppCredentialControllerFactoryInterface {

  /**
   * 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;

  /**
   * DeveloperAppCredentialControllerFactory 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 developerAppCredentialController(string $owner, string $app_name) : DeveloperAppCredentialControllerInterface {
    if (!isset($this->instances[$owner][$app_name])) {
      $this->instances[$owner][$app_name] = new DeveloperAppCredentialController($owner, $app_name, $this->connector, $this->appCacheByOwnerFactory, $this->eventDispatcher);
    }
    return $this->instances[$owner][$app_name];
  }

}

Members

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