1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
collectionbase.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Sale\Internals;
4
5
use Bitrix\Main\Localization\Loc;
6
7
Loc::loadMessages(__FILE__);
8
13
abstract
class
CollectionBase
14
implements
\ArrayAccess, \Countable, \IteratorAggregate
15
{
17
protected
$collection
=
array
();
18
22
public
function
getIterator
(): \Traversable
23
{
24
return
new \ArrayIterator($this->collection);
25
}
26
27
31
public
function
offsetExists
($offset): bool
32
{
33
return
isset($this->collection[$offset]) || array_key_exists($offset, $this->collection);
34
}
35
39
#[\ReturnTypeWillChange]
40
public
function
offsetGet
($offset)
41
{
42
if
(isset($this->collection[$offset]) || array_key_exists($offset, $this->collection))
43
{
44
return
$this->collection[$offset];
45
}
46
47
return
null
;
48
}
49
53
public
function
offsetSet
($offset, $value): void
54
{
55
if
($offset ===
null
)
56
{
57
$this->collection[] = $value;
58
}
59
else
60
{
61
$this->collection[$offset] = $value;
62
}
63
}
64
68
public
function
offsetUnset
($offset): void
69
{
70
unset($this->collection[$offset]);
71
}
72
76
public
function
count
(): int
77
{
78
return
count
($this->collection);
79
}
80
84
public
function
current
()
85
{
86
return
current
($this->collection);
87
}
88
92
public
function
next
()
93
{
94
return
next
($this->collection);
95
}
96
100
public
function
key
()
101
{
102
return
key
($this->collection);
103
}
104
108
public
function
valid
()
109
{
110
$key
= $this->
key
();
111
return
$key
!==
null
;
112
}
113
117
public
function
rewind
()
118
{
119
return
reset($this->collection);
120
}
121
127
public
function
isEmpty
()
128
{
129
return
empty($this->collection);
130
}
131
132
public
function
toArray
()
133
{
134
$result
= [];
135
136
foreach
($this->collection as
$entity
)
137
{
138
$result
[] =
$entity
->toArray();
139
}
140
141
return
$result
;
142
}
143
}
Bitrix\Sale\Internals\CollectionBase
Определения
collectionbase.php:15
Bitrix\Sale\Internals\CollectionBase\offsetUnset
offsetUnset($offset)
Определения
collectionbase.php:68
Bitrix\Sale\Internals\CollectionBase\offsetExists
offsetExists($offset)
Определения
collectionbase.php:31
Bitrix\Sale\Internals\CollectionBase\offsetGet
offsetGet($offset)
Определения
collectionbase.php:40
Bitrix\Sale\Internals\CollectionBase\toArray
toArray()
Определения
collectionbase.php:132
Bitrix\Sale\Internals\CollectionBase\key
key()
Определения
collectionbase.php:100
Bitrix\Sale\Internals\CollectionBase\getIterator
getIterator()
Определения
collectionbase.php:22
Bitrix\Sale\Internals\CollectionBase\$collection
$collection
Определения
collectionbase.php:17
Bitrix\Sale\Internals\CollectionBase\valid
valid()
Определения
collectionbase.php:108
Bitrix\Sale\Internals\CollectionBase\offsetSet
offsetSet($offset, $value)
Определения
collectionbase.php:53
Bitrix\Sale\Internals\CollectionBase\count
count()
Определения
collectionbase.php:76
Bitrix\Sale\Internals\CollectionBase\next
next()
Определения
collectionbase.php:92
Bitrix\Sale\Internals\CollectionBase\rewind
rewind()
Определения
collectionbase.php:117
Bitrix\Sale\Internals\CollectionBase\isEmpty
isEmpty()
Определения
collectionbase.php:127
Bitrix\Sale\Internals\CollectionBase\current
current()
Определения
collectionbase.php:84
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$entity
$entity
Определения
group_bizproc_workflow_delete.php:17
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
bitrix
modules
sale
lib
internals
collectionbase.php
Создано системой
1.14.0