1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
response.php
См. документацию.
1<?
2
3namespace Bitrix\Seo\Retargeting;
4
5use Bitrix\Main\Result;
6
7abstract class Response extends Result
8{
9 const TYPE_CODE = '';
10
11 protected $id;
12 protected $type;
13 protected $adapter;
14 protected $responseText;
15
16 /* @var Request|null */
17 protected $request;
18
19 protected $result;
20 protected $fetchIterator = 0;
21
22 public function __construct()
23 {
24 parent::__construct();
25 $this->type = static::TYPE_CODE;
26 }
27
28 public function setId($id)
29 {
30 $this->id = $id;
31 }
32
33 public function getId()
34 {
35 return $this->id;
36 }
37
38 public function setData(array $data)
39 {
40 parent::setData($data);
41 $this->fetchIterator = 0;
42 }
43
45 {
46 $this->responseText = $responseText;
47 }
48
49 public function getResponseText()
50 {
51 return $this->responseText;
52 }
53
54 public function fetch()
55 {
56 if(is_array($this->data) && !isset($this->data[0]))
57 {
58 if ($this->fetchIterator == 0)
59 {
60 $row = $this->data;
61 $this->fetchIterator++;
62 }
63 else
64 {
65 return null;
66 }
67 }
68 else if(is_array($this->data) && isset($this->data[$this->fetchIterator]))
69 {
70 $row = $this->data[$this->fetchIterator];
71 $this->fetchIterator++;
72 }
73 else
74 {
75 return null;
76 }
77
78 if (is_array($row))
79 {
80 $result = array();
81 foreach ($row as $k => $v)
82 {
83 $result[mb_strtoupper($k)] = $v;
84 }
85
86 return $result;
87 }
88 else
89 {
90 return $row;
91 }
92 }
93
94 public function getRequest()
95 {
96 return $this->request;
97 }
98
99 public function setRequest(Request $request)
100 {
101 return $this->request = $request;
102 }
103
108 public static function create($type)
109 {
110 return Factory::create(get_called_class(), $type);
111 }
112
113 abstract public function parse($data);
114}
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения catalog_reindex.php:36
Определения request.php:10
Определения response.php:5
$data
Определения result.php:22
static create($object, $type, $parameters=null)
Определения factory.php:9
const TYPE_CODE
Определения response.php:9
static create($type)
Определения response.php:108
setRequest(Request $request)
Определения response.php:99
setData(array $data)
Определения response.php:38
setResponseText($responseText)
Определения response.php:44
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$k
Определения template_pdf.php:567