Config ne rabi bit property classa
parent
33bdbba430
commit
df89a76305
|
@ -17,13 +17,6 @@ class Client {
|
||||||
*/
|
*/
|
||||||
protected $httpClient;
|
protected $httpClient;
|
||||||
|
|
||||||
/**
|
|
||||||
* The config.
|
|
||||||
*
|
|
||||||
* @var \Drupal\Core\Config\ImmutableConfig
|
|
||||||
*/
|
|
||||||
protected $config;
|
|
||||||
|
|
||||||
protected $apiKey = null;
|
protected $apiKey = null;
|
||||||
protected $baseUrl = null;
|
protected $baseUrl = null;
|
||||||
|
|
||||||
|
@ -40,11 +33,11 @@ class Client {
|
||||||
*/
|
*/
|
||||||
public function __construct(ClientInterface $httpClient, ImmutableConfig $config) {
|
public function __construct(ClientInterface $httpClient, ImmutableConfig $config) {
|
||||||
$this->httpClient = $httpClient;
|
$this->httpClient = $httpClient;
|
||||||
$this->config = $config;
|
|
||||||
$this->baseUrl = $config->get('url') ? rtrim($config->get('url'), '/') : null;
|
$this->baseUrl = $config->get('url') ? rtrim($config->get('url'), '/') : null;
|
||||||
$this->apiKey = $config->get('key');
|
$this->apiKey = $config->get('key');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Preveri veljavnost tokena-a s klicom na etherpadov api. */
|
||||||
public function checkToken() {
|
public function checkToken() {
|
||||||
if ($this->baseUrl) {
|
if ($this->baseUrl) {
|
||||||
return $this->request('checkToken');
|
return $this->request('checkToken');
|
||||||
|
|
Loading…
Reference in New Issue