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