Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
userdata.php
1
<?php
2
3
namespace
Bitrix\Mail\Helper\OAuth
;
4
use
Bitrix\Main\Web\Json
;
5
6
class
UserData
7
{
8
protected
string
$email
;
9
protected
string
$firstName
;
10
protected
string
$lastName
;
11
protected
string
$fullName
;
12
protected
string
$imageUrl
;
13
protected
bool
$emailIsIntended
;
14
15
protected
string
$userPrincipalName
=
''
;
16
17
public
function
__construct
(
string
$email
=
''
,
string
$firstName
=
''
,
string
$lastName
=
''
,
string
$fullName
=
''
,
string
$imageUrl
=
''
,
$emailIsIntended
=
false
)
18
{
19
$this->email =
$email
;
20
$this->firstName =
$firstName
;
21
$this->lastName =
$lastName
;
22
$this->fullName =
$fullName
;
23
$this->imageUrl =
$imageUrl
;
24
$this->emailIsIntended =
$emailIsIntended
;
25
}
26
27
public
function
getJson
()
28
{
29
return
Json::encode([
30
'email'
=> $this->
getEmail
(),
31
'first_name'
=> $this->
getFirstName
(),
32
'last_name'
=> $this->
getLastName
(),
33
'full_name'
=> $this->
getFullName
(),
34
'image'
=> $this->
getImageUrl
(),
35
'emailIsIntended'
=> $this->
getEmailIsIntended
(),
36
'userPrincipalName'
=> $this->
getUserPrincipalName
(),
37
]);
38
}
39
40
public
function
setEmailIsIntended
(
bool
$emailIsIntended): void
41
{
42
$this->emailIsIntended =
$emailIsIntended
;
43
}
44
45
public
function
getEmail
(): string
46
{
47
return
$this->email
;
48
}
49
50
public
function
getFirstName
(): string
51
{
52
return
$this->firstName
;
53
}
54
55
public
function
getLastName
(): string
56
{
57
return
$this->lastName
;
58
}
59
60
public
function
getFullName
(): string
61
{
62
return
$this->fullName
;
63
}
64
65
public
function
getImageUrl
(): string
66
{
67
return
$this->imageUrl
;
68
}
69
70
public
function
getEmailIsIntended
(): bool
71
{
72
return
$this->emailIsIntended
;
73
}
74
75
public
function
getUserPrincipalName
(): string
76
{
77
return
$this->userPrincipalName
;
78
}
79
80
public
function
setUserPrincipalName
(
string
$value): self
81
{
82
$this->userPrincipalName = $value;
83
84
return
$this;
85
}
86
}
Bitrix\Mail\Helper\OAuth\UserData
Definition
userdata.php:7
Bitrix\Mail\Helper\OAuth\UserData\getEmail
getEmail()
Definition
userdata.php:45
Bitrix\Mail\Helper\OAuth\UserData\setEmailIsIntended
setEmailIsIntended(bool $emailIsIntended)
Definition
userdata.php:40
Bitrix\Mail\Helper\OAuth\UserData\$lastName
string $lastName
Definition
userdata.php:10
Bitrix\Mail\Helper\OAuth\UserData\$emailIsIntended
bool $emailIsIntended
Definition
userdata.php:13
Bitrix\Mail\Helper\OAuth\UserData\getFullName
getFullName()
Definition
userdata.php:60
Bitrix\Mail\Helper\OAuth\UserData\$fullName
string $fullName
Definition
userdata.php:11
Bitrix\Mail\Helper\OAuth\UserData\getUserPrincipalName
getUserPrincipalName()
Definition
userdata.php:75
Bitrix\Mail\Helper\OAuth\UserData\$firstName
string $firstName
Definition
userdata.php:9
Bitrix\Mail\Helper\OAuth\UserData\setUserPrincipalName
setUserPrincipalName(string $value)
Definition
userdata.php:80
Bitrix\Mail\Helper\OAuth\UserData\getLastName
getLastName()
Definition
userdata.php:55
Bitrix\Mail\Helper\OAuth\UserData\getJson
getJson()
Definition
userdata.php:27
Bitrix\Mail\Helper\OAuth\UserData\$imageUrl
string $imageUrl
Definition
userdata.php:12
Bitrix\Mail\Helper\OAuth\UserData\$userPrincipalName
string $userPrincipalName
Definition
userdata.php:15
Bitrix\Mail\Helper\OAuth\UserData\$email
string $email
Definition
userdata.php:8
Bitrix\Mail\Helper\OAuth\UserData\getEmailIsIntended
getEmailIsIntended()
Definition
userdata.php:70
Bitrix\Mail\Helper\OAuth\UserData\getFirstName
getFirstName()
Definition
userdata.php:50
Bitrix\Mail\Helper\OAuth\UserData\getImageUrl
getImageUrl()
Definition
userdata.php:65
Bitrix\Mail\Helper\OAuth\UserData\__construct
__construct(string $email='', string $firstName='', string $lastName='', string $fullName='', string $imageUrl='', $emailIsIntended=false)
Definition
userdata.php:17
Bitrix\Main\Web\Json
Definition
json.php:11
Bitrix\Mail\Helper\OAuth
Definition
google.php:3
modules
mail
lib
helper
oauth
userdata.php
Создано системой
1.10.0