1 | <?php namespace League\OAuth2\Client\Provider; |
||
9 | class LinkedInResourceOwner extends GenericResourceOwner |
||
10 | { |
||
11 | |||
12 | use ArrayAccessorTrait; |
||
13 | |||
14 | /** |
||
15 | * Raw response |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $response = []; |
||
20 | |||
21 | /** |
||
22 | * Sorted profile pictures |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $sortedProfilePictures = []; |
||
27 | |||
28 | /** |
||
29 | * Creates new resource owner. |
||
30 | * |
||
31 | * @param array $response |
||
32 | */ |
||
33 | 6 | public function __construct(array $response = array()) |
|
38 | |||
39 | /** |
||
40 | * Gets resource owner attribute by key. The key supports dot notation. |
||
41 | * |
||
42 | * @return mixed |
||
43 | */ |
||
44 | 6 | public function getAttribute($key) |
|
48 | |||
49 | /** |
||
50 | * Get user first name |
||
51 | * |
||
52 | * @return string|null |
||
53 | */ |
||
54 | 6 | public function getFirstName() |
|
58 | |||
59 | /** |
||
60 | * Get user user id |
||
61 | * |
||
62 | * @return string|null |
||
63 | */ |
||
64 | 6 | public function getId() |
|
68 | |||
69 | /** |
||
70 | * Get specific image by size |
||
71 | * |
||
72 | * @param integer $size |
||
73 | * @return array|null |
||
74 | */ |
||
75 | 3 | public function getImageBySize($size) |
|
83 | |||
84 | /** |
||
85 | * Get available user image sizes |
||
86 | * |
||
87 | * @return array |
||
88 | */ |
||
89 | 3 | public function getImageSizes() |
|
95 | |||
96 | /** |
||
97 | * Get user image url |
||
98 | * |
||
99 | * @return string|null |
||
100 | */ |
||
101 | 6 | public function getImageUrl() |
|
108 | |||
109 | /** |
||
110 | * Get user last name |
||
111 | * |
||
112 | * @return string|null |
||
113 | */ |
||
114 | 6 | public function getLastName() |
|
118 | |||
119 | /** |
||
120 | * Returns the sorted collection of profile pictures. |
||
121 | * |
||
122 | * @return array |
||
123 | */ |
||
124 | 6 | public function getSortedProfilePictures() |
|
128 | |||
129 | /** |
||
130 | * Get user url |
||
131 | * |
||
132 | * @return string|null |
||
133 | */ |
||
134 | 6 | public function getUrl() |
|
140 | |||
141 | /** |
||
142 | * Attempts to sort the collection of profile pictures included in the profile |
||
143 | * before caching them in the resource owner instance. |
||
144 | * |
||
145 | * @return void |
||
146 | */ |
||
147 | 6 | private function setSortedProfilePictures() |
|
182 | |||
183 | /** |
||
184 | * Return all of the owner details available as an array. |
||
185 | * |
||
186 | * @return array |
||
187 | */ |
||
188 | 6 | public function toArray() |
|
192 | } |
||
193 |