- new "Redis monitoring" UI on `/setup` page, closed #745 - improved request handling for 3rd party APIs (ESI, SSO, GitHub) see [exodus4d/pathfinder_esi/README.md](https://github.com/exodus4d/pathfinder_esi/blob/b5d4b19/README.md) - improved `/setup` page, new actions for clear cache/Redis data
37 lines
825 B
PHP
37 lines
825 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: Exodus 4D
|
|
* Date: 26.12.2018
|
|
* Time: 17:43
|
|
*/
|
|
|
|
namespace lib\api;
|
|
|
|
use lib\Config;
|
|
use Exodus4D\ESI\Client\ESI as Client;
|
|
use Exodus4D\ESI\Client\ApiInterface;
|
|
|
|
class CcpClient extends AbstractClient {
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
const CLIENT_NAME = 'ccpClient';
|
|
|
|
/**
|
|
* @param \Base $f3
|
|
* @return ApiInterface|null
|
|
*/
|
|
protected function getClient(\Base $f3) : ?ApiInterface {
|
|
$client = null;
|
|
if(class_exists(Client::class)){
|
|
$client = new Client(Config::getEnvironmentData('CCP_ESI_URL'));
|
|
$client->setDataSource(Config::getEnvironmentData('CCP_ESI_DATASOURCE'));
|
|
}else{
|
|
$this->getLogger()->write($this->getMissingClassError(Client::class));
|
|
}
|
|
|
|
return $client;
|
|
}
|
|
} |