| 1 | <?php namespace Stevenmaguire\OAuth2\Client\Provider; |
||
| 6 | class HerokuResourceOwner implements ResourceOwnerInterface |
||
| 7 | { |
||
| 8 | use ArrayAccessorTrait; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Raw response |
||
| 12 | * |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $response; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Creates new resource owner. |
||
| 19 | * |
||
| 20 | * @param array $response |
||
| 21 | */ |
||
| 22 | 2 | public function __construct(array $response = array()) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Get user id |
||
| 29 | * |
||
| 30 | * @return string|null |
||
| 31 | */ |
||
| 32 | 2 | public function getId() |
|
| 36 | |||
| 37 | /** |
||
| 38 | * Get user name |
||
| 39 | * |
||
| 40 | * @return string|null |
||
| 41 | */ |
||
| 42 | 2 | public function getName() |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Get user email |
||
| 49 | * |
||
| 50 | * @return string|null |
||
| 51 | */ |
||
| 52 | 2 | public function getEmail() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Attempts to pull value from array using dot notation. |
||
| 59 | * |
||
| 60 | * @param string $path |
||
| 61 | * @param string $default |
||
| 62 | * |
||
| 63 | * @return mixed |
||
| 64 | */ |
||
| 65 | 2 | protected function getResponseData($path, $default = null) |
|
| 69 | |||
| 70 | /** |
||
| 71 | * Return all of the owner details available as an array. |
||
| 72 | * |
||
| 73 | * @return array |
||
| 74 | */ |
||
| 75 | 2 | public function toArray() |
|
| 79 | } |
||
| 80 |