-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathClientAbstract.php
executable file
·56 lines (47 loc) · 1.02 KB
/
ClientAbstract.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* SocialConnect project
* @author: Patsura Dmitry @ovr <[email protected]>
*/
declare(strict_types=1);
namespace SocialConnect\Common;
use SocialConnect\Provider\Consumer;
abstract class ClientAbstract
{
/**
* @var Consumer
*/
protected $consumer;
/**
* @var string
*/
protected $accessToken;
/**
* @var HttpStack
*/
protected $httpStack;
/**
* @param HttpStack $httpStack
* @param Consumer $consumer
* @param string|null $accessToken
*/
public function __construct(HttpStack $httpStack, Consumer $consumer, string $accessToken = null)
{
$this->consumer = $consumer;
$this->httpStack = $httpStack;
if ($accessToken) {
$this->setAccessToken($accessToken);
}
}
/**
* @return string
*/
public function getAccessToken()
{
return $this->accessToken;
}
/**
* @param string $accessToken
*/
abstract public function setAccessToken($accessToken);
}