1 | <?php |
||
7 | class GithubResourceOwner implements ResourceOwnerInterface |
||
8 | { |
||
9 | use ArrayAccessorTrait; |
||
10 | |||
11 | /** |
||
12 | * Domain |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $domain; |
||
17 | |||
18 | /** |
||
19 | * Raw response |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $response; |
||
24 | |||
25 | /** |
||
26 | * Creates new resource owner. |
||
27 | * |
||
28 | * @param array $response |
||
29 | */ |
||
30 | 12 | public function __construct(array $response = array()) |
|
34 | |||
35 | /** |
||
36 | * Get resource owner id |
||
37 | * |
||
38 | * @return string|null |
||
39 | */ |
||
40 | 3 | public function getId() |
|
44 | |||
45 | /** |
||
46 | * Get resource owner email |
||
47 | * |
||
48 | * @return string|null |
||
49 | */ |
||
50 | 3 | public function getEmail() |
|
54 | |||
55 | /** |
||
56 | * Get resource owner name |
||
57 | * |
||
58 | * @return string|null |
||
59 | */ |
||
60 | 3 | public function getName() |
|
64 | |||
65 | /** |
||
66 | * Get resource owner nickname |
||
67 | * |
||
68 | * @return string|null |
||
69 | */ |
||
70 | 12 | public function getNickname() |
|
74 | |||
75 | /** |
||
76 | * Get resource owner url |
||
77 | * |
||
78 | * @return string|null |
||
79 | */ |
||
80 | 12 | public function getUrl() |
|
86 | |||
87 | /** |
||
88 | * Set resource owner domain |
||
89 | * |
||
90 | * @param string $domain |
||
91 | * |
||
92 | * @return ResourceOwner |
||
93 | */ |
||
94 | 6 | public function setDomain($domain) |
|
100 | |||
101 | /** |
||
102 | * Return all of the owner details available as an array. |
||
103 | * |
||
104 | * @return array |
||
105 | */ |
||
106 | 3 | public function toArray() |
|
110 | } |
||
111 |