1<?php
2/*!
3* Hybridauth
4* https://hybridauth.github.io | https://github.com/hybridauth/hybridauth
5*  (c) 2017 Hybridauth authors | https://hybridauth.github.io/license.html
6*/
7
8namespace Hybridauth\User;
9
10use Hybridauth\Exception\UnexpectedValueException;
11
12/**
13 * Hybridauth\Userobject represents the current logged in user profile.
14 */
15final class Profile
16{
17    /**
18    * The Unique user's ID on the connected provider
19    *
20    * @var integer
21    */
22    public $identifier = null;
23
24    /**
25    * User website, blog, web page
26    *
27    * @var string
28    */
29    public $webSiteURL = null;
30
31    /**
32    * URL link to profile page on the IDp web site
33    *
34    * @var string
35    */
36    public $profileURL = null;
37
38    /**
39    * URL link to user photo or avatar
40    *
41    * @var string
42    */
43    public $photoURL = null;
44
45    /**
46    * User displayName provided by the IDp or a concatenation of first and last name.
47    *
48    * @var string
49    */
50    public $displayName = null;
51
52    /**
53    * A short about_me
54    *
55    * @var string
56    */
57    public $description = null;
58
59    /**
60    * User's first name
61    *
62    * @var string
63    */
64    public $firstName = null;
65
66    /**
67    * User's last name
68    *
69    * @var string
70    */
71    public $lastName = null;
72
73    /**
74    * male or female
75    *
76    * @var string
77    */
78    public $gender = null;
79
80    /**
81    * Language
82    *
83    * @var string
84    */
85    public $language = null;
86
87    /**
88    * User age, we don't calculate it. we return it as is if the IDp provide it.
89    *
90    * @var integer
91    */
92    public $age = null;
93
94    /**
95    * User birth Day
96    *
97    * @var integer
98    */
99    public $birthDay = null;
100
101    /**
102    * User birth Month
103    *
104    * @var integer
105    */
106    public $birthMonth = null;
107
108    /**
109    * User birth Year
110    *
111    * @var integer
112    */
113    public $birthYear = null;
114
115    /**
116    * User email. Note: not all of IDp grant access to the user email
117    *
118    * @var string
119    */
120    public $email = null;
121
122    /**
123    * Verified user email. Note: not all of IDp grant access to verified user email
124    *
125    * @var string
126    */
127    public $emailVerified = null;
128
129    /**
130    * Phone number
131    *
132    * @var string
133    */
134    public $phone = null;
135
136    /**
137    * Complete user address
138    *
139    * @var string
140    */
141    public $address = null;
142
143    /**
144    * User country
145    *
146    * @var string
147    */
148    public $country = null;
149
150    /**
151    * Region
152    *
153    * @var string
154    */
155    public $region = null;
156
157    /**
158    * City
159    *
160    * @var string
161    */
162    public $city = null;
163
164    /**
165    * Postal code
166    *
167    * @var string
168    */
169    public $zip = null;
170
171    /**
172    * An extra data which is related to the user
173    *
174    * @var array
175    */
176    public $data = [];
177
178    /**
179    * Prevent the providers adapters from adding new fields.
180    *
181    * @var string $name
182    * @var mixed  $value
183    *
184    * @throws UnexpectedValueException
185    */
186    public function __set($name, $value)
187    {
188        throw new UnexpectedValueException(sprintf('Adding new property "%s" to %s is not allowed.', $name, __CLASS__));
189    }
190}
191