Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
builderconnection.php
1<?php
2
4
10
11abstract class BuilderConnection implements Builder
12{
16 protected $data;
17
18 public function __construct($data)
19 {
20 $this->data = $data;
21 }
22
27 public function build(): Connection
28 {
29 return (new Connection())
30 ->setId($this->getId())
31 ->setName($this->getName())
32 ->setLastSyncTime($this->getLastSyncTime())
33 ->setVendor($this->getVendor())
34 ->setDeleted($this->isDeleted())
35 ->setLastSyncTime($this->getLastSyncTime())
36 ->setToken($this->getToken())
37 ->setStatus($this->getStatus())
38 ->setOwner($this->getOwner())
39 ->setNextSyncTry($this->getNextSyncTry())
40 ;
41 }
42
43 abstract protected function getId(): int;
44 abstract protected function getName(): string;
45 abstract protected function getLastSyncTime(): ?Date;
46 abstract protected function getToken(): ?string;
47 abstract protected function getStatus(): ?string;
48 abstract protected function getVendor(): ?VendorInterface;
49 abstract protected function getOwner(): ?Role;
50 abstract protected function isDeleted(): bool;
51 abstract protected function getNextSyncTry(): ?Date;
52}