Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
DB
Tree
NodeSet.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\DB\Tree
;
7
13
class
NodeSet
implements
\Iterator, \Countable
14
{
18
private
$_nodes;
19
23
private
$_current;
24
28
private
$_currentNode;
29
33
private
$count;
34
40
public
function
__construct
()
41
{
42
$this->_nodes = [];
43
$this->_current = 0;
44
$this->_currentNode = 0;
45
$this->
count
= 0;
46
}
47
54
public
function
addNode
(
Node
$node)
55
{
56
$this->_nodes[$this->_currentNode] = $node;
57
$this->
count
++;
58
return
++$this->_currentNode;
59
}
60
66
public
function
count
()
67
{
68
return
$this->count;
69
}
70
76
public
function
valid
()
77
{
78
return
isset($this->_nodes[$this->_current]);
79
}
80
86
public
function
next
()
87
{
88
if
($this->_current > $this->_currentNode) {
89
return
false
;
90
}
else
{
91
return
$this->_current++;
92
}
93
}
94
100
public
function
key
()
101
{
102
return
$this->_current;
103
}
104
110
public
function
current
()
111
{
112
return
$this->_nodes[$this->_current];
113
}
114
120
public
function
rewind
()
121
{
122
$this->_current = 0;
123
}
124
}
Magento\Framework\DB\Tree
Definition:
Node.php:7
Magento\Framework\DB\Tree\NodeSet
Definition:
NodeSet.php:13
Magento\Framework\DB\Tree\NodeSet\next
next()
Definition:
NodeSet.php:86
Magento\Framework\DB\Tree\NodeSet\valid
valid()
Definition:
NodeSet.php:76
Magento\Framework\DB\Tree\NodeSet\__construct
__construct()
Definition:
NodeSet.php:40
Magento\Framework\DB\Tree\Node
Definition:
Node.php:16
Magento\Framework\DB\Tree\NodeSet\addNode
addNode(Node $node)
Definition:
NodeSet.php:54
Magento\Framework\DB\Tree\NodeSet\current
current()
Definition:
NodeSet.php:110
Magento\Framework\DB\Tree\NodeSet\key
key()
Definition:
NodeSet.php:100
Magento\Framework\DB\Tree\NodeSet\rewind
rewind()
Definition:
NodeSet.php:120
Magento\Framework\DB\Tree\NodeSet\count
count()
Definition:
NodeSet.php:66