1 | <?php |
||
20 | class User implements ArrayAccess, UserInterface, JsonSerializable, \Serializable |
||
21 | { |
||
22 | use HasAttributes; |
||
23 | |||
24 | /** |
||
25 | * User constructor. |
||
26 | * |
||
27 | * @param array $attributes |
||
28 | */ |
||
29 | public function __construct(array $attributes) |
||
33 | |||
34 | /** |
||
35 | * Get the unique identifier for the user. |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | public function getId() |
||
43 | |||
44 | /** |
||
45 | * Get the username for the user. |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getUsername() |
||
53 | |||
54 | /** |
||
55 | * Get the nickname / username for the user. |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getNickname() |
||
63 | |||
64 | /** |
||
65 | * Get the full name of the user. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getName() |
||
73 | |||
74 | /** |
||
75 | * Get the e-mail address of the user. |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getEmail() |
||
83 | |||
84 | /** |
||
85 | * Get the avatar / image URL for the user. |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getAvatar() |
||
93 | |||
94 | /** |
||
95 | * Set the token on the user. |
||
96 | * |
||
97 | * @param \Overtrue\Socialite\AccessTokenInterface $token |
||
98 | * |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function setToken(AccessTokenInterface $token) |
||
107 | |||
108 | /** |
||
109 | * @param string $provider |
||
110 | * |
||
111 | * @return $this |
||
112 | */ |
||
113 | public function setProviderName($provider) |
||
119 | |||
120 | /** |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getProviderName() |
||
127 | |||
128 | /** |
||
129 | * Get the authorized token. |
||
130 | * |
||
131 | * @return \Overtrue\Socialite\AccessToken |
||
132 | */ |
||
133 | public function getToken() |
||
137 | |||
138 | /** |
||
139 | * Get user access token. |
||
140 | * |
||
141 | * @return string |
||
142 | */ |
||
143 | public function getAccessToken() |
||
147 | |||
148 | /** |
||
149 | * Get user refresh token. |
||
150 | * |
||
151 | * @return string |
||
152 | */ |
||
153 | public function getRefreshToken() |
||
157 | |||
158 | /** |
||
159 | * Get the original attributes. |
||
160 | * |
||
161 | * @return array |
||
162 | */ |
||
163 | public function getOriginal() |
||
167 | |||
168 | /** |
||
169 | * {@inheritdoc} |
||
170 | */ |
||
171 | public function jsonSerialize() |
||
175 | |||
176 | public function serialize() |
||
180 | |||
181 | /** |
||
182 | * Constructs the object. |
||
183 | * |
||
184 | * @see https://php.net/manual/en/serializable.unserialize.php |
||
185 | * |
||
186 | * @param string $serialized <p> |
||
187 | * The string representation of the object. |
||
188 | * </p> |
||
189 | * |
||
190 | * @since 5.1.0 |
||
191 | */ |
||
192 | public function unserialize($serialized) |
||
196 | } |
||
197 |