Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
provider.php
1<?php
3
6
12abstract class Provider
13{
17 abstract public static function getCode(): string;
18
22 abstract protected function needProvideData(): bool;
23
27 abstract protected function getProviderData(): array;
28
32 public function getData(): array
33 {
34 $result = [];
35
36 if ($this->needProvideData())
37 {
38 $data = $this->getProviderData();
39 if ($data)
40 {
41 $result = $data;
42 }
43 }
44
45 return $result;
46 }
47}