You are here

class ClientFactory in Lockr 8.2

Creates various Lockr clients.

Hierarchy

Expanded class hierarchy of ClientFactory

6 files declare their use of ClientFactory
LockrAdminController.php in src/Controller/LockrAdminController.php
LockrCSRForm.php in src/Form/LockrCSRForm.php
LockrKeyProvider.php in src/Plugin/KeyProvider/LockrKeyProvider.php
Contains Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider.
LockrLoginForm.php in src/Form/LockrLoginForm.php
Contains Drupal\lockr\Form\LockrLoginForm.
LockrMigrateForm.php in src/Form/LockrMigrateForm.php

... See full list

1 string reference to 'ClientFactory'
lockr.services.yml in ./lockr.services.yml
lockr.services.yml
1 service uses ClientFactory
lockr.client_factory in ./lockr.services.yml
Drupal\lockr\ClientFactory

File

src/ClientFactory.php, line 12

Namespace

Drupal\lockr
View source
class ClientFactory {

  /** @var \Lockr\Lockr */
  protected $client;

  /**
   * Construct a new client factory.
   *
   * @param \Lockr\Lockr $client
   */
  public function __construct(Lockr $client) {
    $this->client = $client;
  }

  /**
   * Get a site Lockr client.
   *
   * @return \Lockr\SiteClient
   */
  public function getSiteClient() {
    return new SiteClient($this->client);
  }

  /**
   * Get a key Lockr client.
   *
   * @return \Lockr\KeyClient
   */
  public function getKeyClient() {
    return new KeyClient($this->client);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ClientFactory::$client protected property @var \Lockr\Lockr
ClientFactory::getKeyClient public function Get a key Lockr client.
ClientFactory::getSiteClient public function Get a site Lockr client.
ClientFactory::__construct public function Construct a new client factory.