1 | <?php |
||
8 | class Config implements ConfigInterface |
||
9 | { |
||
10 | /** |
||
11 | * The ClientCredentials instance. |
||
12 | * |
||
13 | * @var \Risan\OAuth1\Credentials\ClientCredentials |
||
14 | */ |
||
15 | protected $clientCredentials; |
||
16 | |||
17 | /** |
||
18 | * The callback URI. |
||
19 | * |
||
20 | * @var string|null |
||
21 | */ |
||
22 | protected $callbackUri; |
||
23 | |||
24 | /** |
||
25 | * The URL for obtaining temporary credentials. Also known as request token |
||
26 | * url. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $temporaryCredentialsUrl; |
||
31 | |||
32 | /** |
||
33 | * The URL for asking user to authorize the request. |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $authorizationUrl; |
||
38 | |||
39 | /** |
||
40 | * Create new instance of Config class. |
||
41 | * |
||
42 | * @param \Risan\OAuth1\Credentials\ClientCredentials $clientCredentials |
||
43 | * @param string $temporaryCredentialsUrl |
||
44 | * @param string $authorizationUrl |
||
45 | * @param string|null $callbackUri |
||
46 | */ |
||
47 | 16 | public function __construct(ClientCredentials $clientCredentials, $temporaryCredentialsUrl, $authorizationUrl, $callbackUri = null) |
|
54 | |||
55 | /** |
||
56 | * {@inheritDoc} |
||
57 | */ |
||
58 | 6 | public function getClientCredentials() |
|
62 | |||
63 | /** |
||
64 | * {@inheritDoc} |
||
65 | */ |
||
66 | 2 | public function getClientCredentialsIdentifier() |
|
70 | |||
71 | /** |
||
72 | * {@inheritDoc} |
||
73 | */ |
||
74 | 2 | public function getClientCredentialsSecret() |
|
78 | |||
79 | /** |
||
80 | * {@inheritDoc} |
||
81 | */ |
||
82 | 1 | public function hasCallbackUri() |
|
86 | |||
87 | /** |
||
88 | * {@inheritDoc} |
||
89 | */ |
||
90 | 3 | public function getCallbackUri() |
|
94 | |||
95 | /** |
||
96 | * {@inheritDoc} |
||
97 | */ |
||
98 | 2 | public function getTemporaryCredentialsUrl() |
|
102 | |||
103 | /** |
||
104 | * {@inheritDoc} |
||
105 | */ |
||
106 | 2 | public function getAuthorizationUrl() |
|
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | 8 | public static function createFromArray(array $config) |
|
138 | } |
||
139 |