LockrSettings.php in Lockr 7.3
File
vendor/lockr/lockr/src/LockrSettings.php
View source
<?php
namespace Lockr;
class LockrSettings implements SettingsInterface {
private $certPath;
private $host;
private $certPassword;
public function __construct($cert_path = null, $host = null, $cert_password = null) {
$this->certPath = $cert_path;
$this->host = $host;
$this->certPassword = $cert_password;
}
public function getHostname() {
return $this->host ?: 'api.lockr.io';
}
public function getOptions() {
$opts = [];
if ($this->certPath) {
if ($this->certPassword) {
$opts['cert'] = [
$this->certPath,
$this->certPassword,
];
}
else {
$opts['cert'] = $this->certPath;
}
}
return $opts;
}
}