Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
avatar.php
1<?php
2
4
6
7final class Avatar implements Arrayable
8{
9 public function __construct(private string $type, private string $id = '')
10 {}
11
12 public function getType(): string
13 {
14 return $this->type;
15 }
16
17 public function setType(string $type): self
18 {
19 $this->type = $type;
20
21 return $this;
22 }
23
24 public function getId(): string
25 {
26 return $this->id;
27 }
28
29 public function setId(string $id): self
30 {
31 $this->id = $id;
32
33 return $this;
34 }
35
36 public function toArray(): array
37 {
38 return [
39 'type' => $this->type,
40 'id' => $this->id,
41 ];
42 }
43}
__construct(private string $type, private string $id='')
Definition avatar.php:9