1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
nodelist.php
См. документацию.
1
<?php
2
namespace
Bitrix\Main\Web\DOM;
3
4
/*
5
class NodeList extends \Bitrix\Main\Type\Dictionary implements \Traversable
6
{
7
public function item($index)
8
{
9
return $this->offsetGet($index);
10
}
11
12
public function haveItem(Node $item)
13
{
14
for($i = 0; $i < $this->count(); $i++)
15
{
16
if($item->isEqual($this->item($i)))
17
{
18
return true;
19
}
20
}
21
22
return false;
23
}
24
25
public function removeItem(Node $item)
26
{
27
for($i = 0; $i < $this->count(); $i++)
28
{
29
if($item === $this->item($i))
30
{
31
$this->offsetUnset($i);
32
break;
33
}
34
}
35
}
36
}
37
*/
38
39
class
NodeList
implements
\Iterator {
40
protected
$length
= 0;
41
protected
$position
= 0;
42
protected
$values
=
array
();
43
44
public
function
__construct
(
array
$values
=
null
)
45
{
46
if
(
$values
===
null
)
47
{
48
$this->
position
= 0;
49
$this->
set
(
$values
);
50
}
51
}
52
53
public
function
getLength
()
54
{
55
return
$this->length
;
56
}
57
58
/*
59
* @return Node|null
60
*/
61
public
function
item
($index)
62
{
63
if
($this->
valid
($index))
64
{
65
return
$this->values[$index];
66
}
67
68
return
null
;
69
}
70
71
public
function
set
(
array
$values
)
72
{
73
$this->values = array_values(
$values
);
74
$this->length =
count
($this->values);
75
}
76
77
public
function
get
()
78
{
79
return
$this->values
;
80
}
81
82
public
function
rewind
()
83
{
84
$this->
position
= 0;
85
}
86
87
public
function
current
()
88
{
89
return
$this->values[
$this->position
];
90
}
91
92
public
function
key
()
93
{
94
return
$this->position
;
95
}
96
97
public
function
next
()
98
{
99
++
$this->position
;
100
}
101
102
public
function
valid
($index =
null
)
103
{
104
if
($index ===
null
)
105
{
106
$index =
$this->position
;
107
}
108
109
return
isset($this->values[$index]);
110
}
111
}
Bitrix\Main\Web\DOM\NodeList
Определения
nodelist.php:39
Bitrix\Main\Web\DOM\NodeList\__construct
__construct(array $values=null)
Определения
nodelist.php:44
Bitrix\Main\Web\DOM\NodeList\$position
$position
Определения
nodelist.php:41
Bitrix\Main\Web\DOM\NodeList\key
key()
Определения
nodelist.php:92
Bitrix\Main\Web\DOM\NodeList\getLength
getLength()
Определения
nodelist.php:53
Bitrix\Main\Web\DOM\NodeList\valid
valid($index=null)
Определения
nodelist.php:102
Bitrix\Main\Web\DOM\NodeList\next
next()
Определения
nodelist.php:97
Bitrix\Main\Web\DOM\NodeList\$length
$length
Определения
nodelist.php:40
Bitrix\Main\Web\DOM\NodeList\rewind
rewind()
Определения
nodelist.php:82
Bitrix\Main\Web\DOM\NodeList\item
item($index)
Определения
nodelist.php:61
Bitrix\Main\Web\DOM\NodeList\current
current()
Определения
nodelist.php:87
Bitrix\Main\Web\DOM\NodeList\$values
$values
Определения
nodelist.php:42
position
background position
Определения
file_new.php:745
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
count
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения
waybill.php:936
bitrix
modules
main
lib
web
dom
nodelist.php
Создано системой
1.14.0