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
Pricing
Price
Pool.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Pricing\Price
;
8
15
class
Pool
implements
\Iterator, \ArrayAccess
16
{
20
protected
$prices
;
21
26
public
function
__construct
(
27
array
$prices
,
28
\Iterator
$target
=
null
29
) {
30
$this->prices =
$prices
;
31
foreach
(
$target
?: [] as
$code
=>
$class
) {
32
if
(empty($this->prices[
$code
])) {
33
$this->prices[
$code
] =
$class
;
34
}
35
}
36
}
37
43
public
function
rewind
()
44
{
45
return
reset($this->prices);
46
}
47
53
public
function
current
()
54
{
55
return
current
($this->prices);
56
}
57
63
public
function
key
()
64
{
65
return
key
($this->prices);
66
}
67
73
public
function
next
()
74
{
75
return
next
($this->prices);
76
}
77
83
public
function
valid
()
84
{
85
return
(
bool
)$this->
key
();
86
}
87
94
public
function
get
(
$code
)
95
{
96
return
$this->prices[
$code
];
97
}
98
106
public
function
offsetSet
($offset,
$value
)
107
{
108
if
($offset ===
null
) {
109
$this->prices[] =
$value
;
110
}
else
{
111
$this->prices[$offset] =
$value
;
112
}
113
}
114
121
public
function
offsetExists
($offset)
122
{
123
return
isset($this->prices[$offset]);
124
}
125
132
public
function
offsetUnset
($offset)
133
{
134
unset($this->prices[$offset]);
135
}
136
143
public
function
offsetGet
($offset)
144
{
145
return
$this->prices[$offset] ??
null
;
146
}
147
}
Magento\Framework\Pricing\Price\Pool\$prices
$prices
Definition:
Pool.php:20
Magento\Framework\Pricing\Price\Pool\key
key()
Definition:
Pool.php:63
Magento\Framework\Pricing\Price\Pool\offsetUnset
offsetUnset($offset)
Definition:
Pool.php:132
Magento\Framework\Pricing\Price\Pool\offsetSet
offsetSet($offset, $value)
Definition:
Pool.php:106
Magento\Framework\Pricing\Price\Pool\rewind
rewind()
Definition:
Pool.php:43
Magento\Framework\Pricing\Price\Pool\offsetGet
offsetGet($offset)
Definition:
Pool.php:143
$target
$target
Definition:
skip.phtml:8
Magento\Framework\Pricing\Price\Pool
Definition:
Pool.php:15
Magento\Framework\Pricing\Price\Pool\next
next()
Definition:
Pool.php:73
$class
$_option $_optionId $class
Definition:
date.phtml:13
$value
$value
Definition:
gender.phtml:16
Magento\Framework\Pricing\Price\Pool\valid
valid()
Definition:
Pool.php:83
Magento\Framework\Pricing\Price\Pool\offsetExists
offsetExists($offset)
Definition:
Pool.php:121
Magento\Framework\Pricing\Price
Definition:
AbstractPrice.php:7
Magento\Framework\Pricing\Price\Pool\__construct
__construct(array $prices, \Iterator $target=null)
Definition:
Pool.php:26
$code
$code
Definition:
info.phtml:12
Magento\Framework\Pricing\Price\Pool\current
current()
Definition:
Pool.php:53