Completed
Push — master ( 813594...c9f7b6 )
by Sk Asadur
01:03
created

ZohoAccessToken::getApiDomain()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Asad\OAuth2\Client\AccessToken;
4
5
use League\OAuth2\Client\Token\AccessToken;
6
7
class ZohoAccessToken extends AccessToken
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $apiDomain;
13
14
    /**
15
     * @var string
16
     */
17
    protected $tokenType;
18
    /**
19
     * api_domain and token type will get everytime
20
     */
21
    public function __construct(array $options = [])
22
    {
23
        if (!empty($options['api_domain'])) {
24
            $this->apiDomain = $options['api_domain'];
25
        }
26
27
        if (!empty($options['token_type'])) {
28
            $this->tokenType = $options['token_type'];
29
        }
30
31
        parent::__construct($options);
32
    }
33
34
    /**
35
     * Zoho API domain name
36
     * @return string
37
     */
38
    public function getApiDomain()
39
    {
40
        return $this->apiDomain;
41
    }
42
43
    /**
44
     * Oauth2 Bearer Toekn type
45
     * @return string
46
     */
47
    public function getTokenType()
48
    {
49
        return $this->tokenType;
50
    }
51
}
52