Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
user.php
1<?php
2
4
6
7class User extends BaseRole
8{
9 public const TYPE = 'user';
10
14 public static array $users = [];
18 protected string $name;
22 protected ?int $id = null;
26 protected ?string $lastName = null;
30 protected ?string $languageId = null;
32 protected ?string $email = null;
33
37 public function getFields(): array
38 {
39 return [
40 'name' => $this->name,
41 'lastName' => $this->lastName,
42 ];
43 }
44
48 public function toString(): string
49 {
50 return $this->name;
51 }
52
56 public function getName(): string
57 {
58 return $this->name;
59 }
60
65 public function setLastName(string $lastName = null): self
66 {
67 $this->lastName = $lastName;
68
69 return $this;
70 }
71
75 public function getLastName(): ?string
76 {
77 return $this->lastName;
78 }
79
83 public function getFullName(): string
84 {
85 return $this->getName() . ' ' . $this->getLastName();
86 }
87
91 public function getLanguageId(): ?string
92 {
93 return $this->languageId;
94 }
95
100 public function setLanguageId(string $languageId): User
101 {
102 $this->languageId = $languageId;
103
104 return $this;
105 }
106
111 public function setEmail(?string $email): User
112 {
113 $this->email = $email;
114
115 return $this;
116 }
117}
setEmail(?string $email)
Definition user.php:111
setLanguageId(string $languageId)
Definition user.php:100
setLastName(string $lastName=null)
Definition user.php:65