Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
exportpattern.php
1<?php
2
4
5
8
9abstract class ExportPattern
10{
15 abstract protected function getItems(array $fields);
16
21 abstract protected function convert(array $items);
22
27 abstract protected function export(array $items);
28
33 abstract protected function logger(array $items);
34
39 public function proccess(array $fields)
40 {
41 $r = $this->getItems($fields);
42 if(!$r->isSuccess())
43 return $r;
44
45 $entityItems = $r->getData();
46 $r = $this->convert($entityItems);
47 if(!$r->isSuccess())
48 return $r;
49
50 $documents = $r->getData();
51 $r = $this->export($documents);
52
53 $this->logger($entityItems);
54
55 return $r;
56 }
57}