1 | <?php |
||
16 | abstract class AbstractToken implements TokenInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $hash; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | protected $expireIn; |
||
27 | |||
28 | /** |
||
29 | * @var AccountInterface |
||
30 | */ |
||
31 | protected $account; |
||
32 | |||
33 | /** |
||
34 | * @var ApplicationInterface |
||
35 | */ |
||
36 | protected $application; |
||
37 | |||
38 | /** |
||
39 | * @see AccessTokenInterface::__construct() |
||
40 | */ |
||
41 | public function __construct( |
||
56 | |||
57 | /** |
||
58 | * @see AccessTokenInterface::getHash() |
||
59 | */ |
||
60 | public function getHash() |
||
64 | |||
65 | /** |
||
66 | * @see AccessTokenInterface::getExpireIn() |
||
67 | */ |
||
68 | public function getExpireIn() |
||
72 | |||
73 | /** |
||
74 | * @see AccessTokenInterface::getAccount() |
||
75 | */ |
||
76 | public function getAccount() |
||
80 | |||
81 | /** |
||
82 | * @see AccessTokenInterface::getApplication() |
||
83 | */ |
||
84 | public function getApplication() |
||
88 | |||
89 | /** |
||
90 | * @see AccessTokenInterface::getRoles() |
||
91 | */ |
||
92 | public function getRoles() |
||
96 | } |
||
97 |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: