Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
result.php
1
<?
2
3
namespace
Bitrix\Seo\LeadAds
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Main\Type\DateTime
;
7
8
class
Result
extends
Main\Result
9
{
11
protected
$id
;
12
14
protected
$dateCreate
;
15
17
protected
$currentIterationNumber
= 0;
18
25
public
function
setData
(array
$data
)
26
{
27
$this->data = array();
28
$this->currentIterationNumber = 0;
29
30
foreach
(
$data
as $item)
31
{
32
if
(!isset($item[
'NAME'
]) || !$item[
'NAME'
])
33
{
34
continue
;
35
}
36
37
if
(!isset($item[
'VALUES'
]) || !is_array($item[
'VALUES'
]) || !$item[
'VALUES'
])
38
{
39
continue
;
40
}
41
42
$this->
addFieldValues
($item[
'NAME'
], $item[
'VALUES'
]);
43
}
44
}
45
52
public
function
addFieldValues
($name, array $values)
53
{
54
$this->data[] = array(
55
'NAME'
=> $name,
56
'VALUES'
=> $values
57
);
58
}
59
65
public
function
getId
()
66
{
67
return
$this->id;
68
}
69
75
public
function
setId
($id)
76
{
77
$this->
id
=
$id
;
78
}
79
85
public
function
getDateCreate
()
86
{
87
return
$this->dateCreate;
88
}
89
95
public
function
setDateCreate
(
DateTime
$dateCreate)
96
{
97
$this->dateCreate = $dateCreate;
98
}
99
105
public
function
fetch
()
106
{
107
if
(!isset($this->data[$this->currentIterationNumber]))
108
{
109
return
null
;
110
}
111
112
$row = $this->data[$this->currentIterationNumber];
113
$this->currentIterationNumber++;
114
115
return
$row;
116
}
117
}
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Main\Result\$data
$data
Definition
result.php:22
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Seo\LeadAds\Result\getId
getId()
Definition
result.php:65
Bitrix\Seo\LeadAds\Result\$currentIterationNumber
$currentIterationNumber
Definition
result.php:17
Bitrix\Seo\LeadAds\Result\getDateCreate
getDateCreate()
Definition
result.php:85
Bitrix\Seo\LeadAds\Result\addFieldValues
addFieldValues($name, array $values)
Definition
result.php:52
Bitrix\Seo\LeadAds\Result\setId
setId($id)
Definition
result.php:75
Bitrix\Seo\LeadAds\Result\setData
setData(array $data)
Definition
result.php:25
Bitrix\Seo\LeadAds\Result\$dateCreate
$dateCreate
Definition
result.php:14
Bitrix\Seo\LeadAds\Result\setDateCreate
setDateCreate(DateTime $dateCreate)
Definition
result.php:95
Bitrix\Seo\LeadAds\Result\fetch
fetch()
Definition
result.php:105
Bitrix\Seo\LeadAds\Result\$id
$id
Definition
result.php:11
Bitrix\Main
Bitrix\Seo\LeadAds
Definition
account.php:3
modules
seo
lib
leadads
result.php
Создано системой
1.10.0