-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathExtractorInterface.php
231 lines (200 loc) · 4.45 KB
/
ExtractorInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?php
/*
* This file is part of the Oryzone PHPoAuthUserData package <https://github.com/Oryzone/PHPoAuthUserData>.
*
* (c) Oryzone, developed by Luciano Mammino <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace OAuth\UserData\Extractor;
/**
* Interface ExtractorInterface
* @package OAuth\UserData\Extractor
*/
interface ExtractorInterface
{
/**
* Field names constants
*/
const FIELD_UNIQUE_ID = 'uniqueId';
const FIELD_USERNAME = 'username';
const FIELD_FIRST_NAME = 'firstName';
const FIELD_LAST_NAME = 'lastName';
const FIELD_FULL_NAME = 'fullName';
const FIELD_EMAIL = 'email';
const FIELD_LOCATION = 'location';
const FIELD_DESCRIPTION = 'description';
const FIELD_IMAGE_URL = 'imageUrl';
const FIELD_PROFILE_URL = 'profileUrl';
const FIELD_WEBSITES = 'websites';
const FIELD_VERIFIED_EMAIL = 'verifiedEmail';
const FIELD_EXTRA = 'extra';
/**
* @param \OAuth\Common\Service\ServiceInterface $service
* @return void
*/
public function setService($service);
/**
* Check if the current provider supports a unique id
*
* @return bool
*/
public function supportsUniqueId();
/**
* Get the unique id of the user
*
* @return string
*/
public function getUniqueId();
/**
* Check if the current provider supports a username
*
* @return bool
*/
public function supportsUsername();
/**
* Get the username
*
* @return string
*/
public function getUsername();
/**
* Check if the current provider supports a first name
*
* @return bool
*/
public function supportsFirstName();
/**
* Get the first name
*
* @return string
*/
public function getFirstName();
/**
* Check if the current provider supports a last name
* @return bool
*/
public function supportsLastName();
/**
* Get the last name
*
* @return string
*/
public function getLastName();
/**
* Check if the current provider supports a full name
*
* @return bool
*/
public function supportsFullName();
/**
* Get the full name
*
* @return string
*/
public function getFullName();
/**
* Check ig the current provider supports an email
*
* @return bool
*/
public function supportsEmail();
/**
* Get the email
*
* @return string
*/
public function getEmail();
/**
* Check if the current provider supports a location
*
* @return bool
*/
public function supportsLocation();
/**
* Get the location
*
* @return string
*/
public function getLocation();
/**
* Check if the current provider supports a description
*
* @return bool
*/
public function supportsDescription();
/**
* Get the description
*
* @return string
*/
public function getDescription();
/**
* Check if the current provider supports an image url
*
* @return bool
*/
public function supportsImageUrl();
/**
* Get the image url
*
* @return string
*/
public function getImageUrl();
/**
* Check if the current provider supports a profile url
*
* @return bool
*/
public function supportsProfileUrl();
/**
* Get the profile url
*
* @return string
*/
public function getProfileUrl();
/**
* Check if the current provider supports websites
*
* @return bool
*/
public function supportsWebsites();
/**
* Get websites
*
* @return array
*/
public function getWebsites();
/**
* Check if the current provider supports the "verified" field
*
* @return bool
*/
public function supportsVerifiedEmail();
/**
* Get the verified
*
* @return bool
*/
public function isEmailVerified();
/**
* Check if the current provider supports extra data
*
* @return bool
*/
public function supportsExtra();
/**
* Get an extra attribute
*
* @param string $key
* @return array
*/
public function getExtra($key);
/**
* Get the extras array
*
* @return array
*/
public function getExtras();
}