class ClientFactory in Lockr 8.2
Creates various Lockr clients.
Hierarchy
- class \Drupal\lockr\ClientFactory
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
1 string reference to 'ClientFactory'
1 service uses ClientFactory
File
- src/
ClientFactory.php, line 12
Namespace
Drupal\lockrView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ClientFactory:: |
protected | property | @var \Lockr\Lockr | |
ClientFactory:: |
public | function | Get a key Lockr client. | |
ClientFactory:: |
public | function | Get a site Lockr client. | |
ClientFactory:: |
public | function | Construct a new client factory. |