mirror of
https://github.com/opdavies/glassboxx-sdk-php.git
synced 2025-02-17 22:50:48 +00:00
parent
7162438837
commit
0650795d60
9 changed files with 265 additions and 33 deletions
|
|
@ -4,7 +4,29 @@ declare(strict_types=1);
|
|||
|
||||
namespace Opdavies\Glassboxx\Request;
|
||||
|
||||
use Opdavies\Glassboxx\Config;
|
||||
use Symfony\Component\HttpClient\HttpClient;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
abstract class AbstractRequest
|
||||
{
|
||||
public const BASE_URL = 'https://server.glassboxx.co.uk/rest/V1';
|
||||
|
||||
/** @var HttpClient */
|
||||
protected $client;
|
||||
|
||||
/** @var Config */
|
||||
protected $config;
|
||||
|
||||
public function __construct(HttpClientInterface $client)
|
||||
{
|
||||
$this->client = $client;
|
||||
}
|
||||
|
||||
public function withConfig(Config $config): AbstractRequest
|
||||
{
|
||||
$this->config = $config;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue