1 | <?php |
||
14 | class AccessToken implements AccessTokenInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $hash; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | protected $expireIn; |
||
25 | |||
26 | /** |
||
27 | * @var AccountInterface |
||
28 | */ |
||
29 | protected $account; |
||
30 | |||
31 | /** |
||
32 | * @var ApplicationInterface |
||
33 | */ |
||
34 | protected $application; |
||
35 | |||
36 | /** |
||
37 | * @var RefreshTokenInterface |
||
38 | */ |
||
39 | protected $refreshToken; |
||
40 | |||
41 | /** |
||
42 | * @see AccessTokenInterface::__construct() |
||
43 | */ |
||
44 | public function __construct( |
||
61 | |||
62 | /** |
||
63 | * @see AccessTokenInterface::getHash() |
||
64 | */ |
||
65 | public function getHash() |
||
69 | |||
70 | /** |
||
71 | * @see AccessTokenInterface::getExpireIn() |
||
72 | */ |
||
73 | public function getExpireIn() |
||
77 | |||
78 | /** |
||
79 | * @see AccessTokenInterface::getAccount() |
||
80 | */ |
||
81 | public function getAccount() |
||
85 | |||
86 | /** |
||
87 | * @see AccessTokenInterface::getApplication() |
||
88 | */ |
||
89 | public function getApplication() |
||
93 | |||
94 | /** |
||
95 | * @see AccessTokenInterface::getRoles() |
||
96 | */ |
||
97 | public function getRoles() |
||
101 | |||
102 | /** |
||
103 | * @see AccessTokenInterface::getRefreshToken() |
||
104 | */ |
||
105 | public function getRefreshToken() |
||
109 | |||
110 | |||
111 | } |
||
112 |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: