Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
member.php
1<?php
2
4
5class Member
6{
7 private int $id = 0;
8 private string $name = '';
9 private string $lastName = '';
10 private string $avatar = '';
11
15 public function getId(): int
16 {
17 return $this->id;
18 }
19
24 public function setId(int $id): self
25 {
26 $this->id = $id;
27
28 return $this;
29 }
30
34 public function getName(): string
35 {
36 return $this->name;
37 }
38
43 public function setName(string $name): self
44 {
45 $this->name = $name;
46
47 return $this;
48 }
49
53 public function getLastName(): string
54 {
55 return $this->lastName;
56 }
57
62 public function setLastName(string $lastName): self
63 {
64 $this->lastName = $lastName;
65
66 return $this;
67 }
68
72 public function getAvatar(): string
73 {
74 return $this->avatar;
75 }
76
81 public function setAvatar(string $avatar): self
82 {
83 $this->avatar = $avatar;
84
85 return $this;
86 }
87
88 public function toArray(): array
89 {
90 return [
91 'id' => $this->getId(),
92 'name' => $this->getName(),
93 'lastName' => $this->getLastName(),
94 'avatar' => $this->getAvatar(),
95 ];
96 }
97}