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 | * Creates new resource owner. |
||
23 | * |
||
24 | * @param array $response |
||
25 | */ |
||
26 | 6 | public function __construct(array $response = array()) |
|
30 | |||
31 | /** |
||
32 | * Gets resource owner attribute by key. The key supports dot notation. |
||
33 | * |
||
34 | * @return mixed |
||
35 | */ |
||
36 | 6 | public function getAttribute($key) |
|
40 | |||
41 | /** |
||
42 | * Get user email |
||
43 | * |
||
44 | * @return string|null |
||
45 | */ |
||
46 | 6 | public function getEmail() |
|
47 | { |
||
48 | 6 | return $this->getAttribute('emailAddress'); |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * Get user firstname |
||
53 | * |
||
54 | * @return string|null |
||
55 | */ |
||
56 | 6 | public function getFirstName() |
|
60 | |||
61 | /** |
||
62 | * Get user imageurl |
||
63 | * |
||
64 | * @return string|null |
||
65 | */ |
||
66 | 6 | public function getImageurl() |
|
70 | |||
71 | /** |
||
72 | * Get user original photo url |
||
73 | * |
||
74 | * @return string|null |
||
75 | */ |
||
76 | 6 | public function getImageOriginalUrl() |
|
86 | 6 | ||
87 | /** |
||
88 | 6 | * Get user lastname |
|
89 | * |
||
90 | * @return string|null |
||
91 | */ |
||
92 | public function getLastName() |
||
96 | 6 | ||
97 | /** |
||
98 | 6 | * Get user userId |
|
99 | * |
||
100 | * @return string|null |
||
101 | */ |
||
102 | public function getId() |
||
106 | 6 | ||
107 | /** |
||
108 | 6 | * Get user location |
|
109 | * |
||
110 | * @return string|null |
||
111 | */ |
||
112 | public function getLocation() |
||
116 | 6 | ||
117 | /** |
||
118 | 6 | * Get user description |
|
119 | * |
||
120 | * @return string|null |
||
121 | */ |
||
122 | public function getDescription() |
||
126 | 6 | ||
127 | /** |
||
128 | 6 | * Get user url |
|
129 | * |
||
130 | * @return string|null |
||
131 | */ |
||
132 | public function getUrl() |
||
136 | 6 | ||
137 | /** |
||
138 | 6 | * Get user summary |
|
139 | * |
||
140 | * @return string|null |
||
141 | */ |
||
142 | public function getSummary() |
||
146 | |||
147 | /** |
||
148 | * Return all of the owner details available as an array. |
||
149 | * |
||
150 | * @return array |
||
151 | */ |
||
152 | public function toArray() |
||
156 | } |
||
157 |