Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
vendor.php
1<?php
3
7
8class Vendor implements VendorInterface
9{
11 protected $code;
13 protected $title;
15 private $server;
16
22 public function __construct(array $data)
23 {
24 if (empty($data['ACCOUNT_TYPE']))
25 {
26 throw new ObjectException("Account type is not defined");
27 }
28 $this->server = new Server($data);
29 $this->code = $data['ACCOUNT_TYPE'];
30 $this->title = $data['ACCOUNT_TYPE'];
31 }
32
36 public function getCode(): string
37 {
38 return $this->code;
39 }
40
44 public function getServer(): ServerInterface
45 {
46 return $this->server;
47 }
48
54 public function setServer(Server $server): self
55 {
56 $this->server = $server;
57
58 return $this;
59 }
60}