Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
contact.php
1<?php
2
4
10final class Contact
11{
13 private $name;
14
16 private $phones = [];
17
21 public function getName(): ?string
22 {
23 return $this->name;
24 }
25
30 public function setName(string $name): Contact
31 {
32 $this->name = $name;
33 return $this;
34 }
35
39 public function getPhones(): array
40 {
41 return $this->phones;
42 }
43
48 public function addPhone(Phone $phone): Contact
49 {
50 $this->phones[] = $phone;
51 return $this;
52 }
53}