class LockrSettings in Lockr 7.3
Hierarchy
- class \Lockr\LockrSettings implements SettingsInterface
Expanded class hierarchy of LockrSettings
File
- vendor/
lockr/ lockr/ src/ LockrSettings.php, line 4
Namespace
LockrView source
class LockrSettings implements SettingsInterface {
/** @var string $certPath */
private $certPath;
/** @var string $host */
private $host;
/** @var string $certPassword */
private $certPassword;
/**
* @param string|null $cert_path
* @param string|null $host
* @param string|null $cert_password
*/
public function __construct($cert_path = null, $host = null, $cert_password = null) {
$this->certPath = $cert_path;
$this->host = $host;
$this->certPassword = $cert_password;
}
/**
* {@inheritdoc}
*/
public function getHostname() {
return $this->host ?: 'api.lockr.io';
}
/**
* {@inheritdoc}
*/
public function getOptions() {
$opts = [];
if ($this->certPath) {
if ($this->certPassword) {
$opts['cert'] = [
$this->certPath,
$this->certPassword,
];
}
else {
$opts['cert'] = $this->certPath;
}
}
return $opts;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LockrSettings:: |
private | property | @var string $certPassword | |
LockrSettings:: |
private | property | @var string $certPath | |
LockrSettings:: |
private | property | @var string $host | |
LockrSettings:: |
public | function |
Gets the Lockr host to connect to. Overrides SettingsInterface:: |
|
LockrSettings:: |
public | function |
Gets the Guzzle client options to apply. Overrides SettingsInterface:: |
1 |
LockrSettings:: |
public | function |