| 1 | <?php namespace Stevenmaguire\OAuth2\Client\Provider; |
||
| 5 | class FoursquareResourceOwner implements ResourceOwnerInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Raw response |
||
| 9 | * |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | protected $response; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Creates new resource owner. |
||
| 16 | * |
||
| 17 | * @param array $response |
||
| 18 | */ |
||
| 19 | 2 | public function __construct(array $response = array()) |
|
| 23 | |||
| 24 | /** |
||
| 25 | * Get user id |
||
| 26 | * |
||
| 27 | * @return string|null |
||
| 28 | */ |
||
| 29 | 2 | public function getId() |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Get user first name |
||
| 36 | * |
||
| 37 | * @return string|null |
||
| 38 | */ |
||
| 39 | 2 | public function getFirstName() |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Get user last name |
||
| 46 | * |
||
| 47 | * @return string|null |
||
| 48 | */ |
||
| 49 | 2 | public function getLastName() |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Get user email |
||
| 56 | * |
||
| 57 | * @return string|null |
||
| 58 | */ |
||
| 59 | 2 | public function getEmail() |
|
| 63 | |||
| 64 | /** |
||
| 65 | * Get user bio |
||
| 66 | * |
||
| 67 | * @return string|null |
||
| 68 | */ |
||
| 69 | 2 | public function getBio() |
|
| 73 | |||
| 74 | /** |
||
| 75 | * Attempts to pull value from array using dot notation. |
||
| 76 | * |
||
| 77 | * @param string $path |
||
| 78 | * @param string $default |
||
| 79 | * |
||
| 80 | * @return mixed |
||
| 81 | */ |
||
| 82 | 2 | protected function getResponseData($path, $default = null) |
|
| 100 | |||
| 101 | /** |
||
| 102 | * Return all of the owner details available as an array. |
||
| 103 | * |
||
| 104 | * @return array |
||
| 105 | */ |
||
| 106 | 2 | public function toArray() |
|
| 110 | } |
||
| 111 |