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
Session
Storage.php
Go to the documentation of this file.
1
<?php
8
namespace
Magento\Framework\Session
;
9
10
class
Storage
extends
\Magento\Framework\DataObject
implements
StorageInterface
11
{
17
protected
$namespace
;
18
25
public
function
__construct
(
$namespace
=
'default'
, array
$data
= [])
26
{
27
$this->
namespace
=
$namespace
;
28
parent::__construct(
$data
);
29
}
30
34
public
function
init
(array
$data
)
35
{
36
$namespace
= $this->
getNamespace
();
37
if
(isset(
$data
[
$namespace
])) {
38
$this->
setData
($data[
$namespace
]);
39
}
40
$_SESSION[
$namespace
] = &
$this->_data
;
41
}
42
46
public
function
getNamespace
()
47
{
48
return
$this->namespace
;
49
}
50
58
public
function
getData
($key =
''
, $clear =
false
)
59
{
60
$data
= parent::getData($key);
61
if
($clear && isset($this->_data[$key])) {
62
unset($this->_data[$key]);
63
}
64
return
$data
;
65
}
66
}
Magento\Framework\DataObject\$_data
$_data
Definition:
DataObject.php:22
Magento\Framework\Session\Storage
Definition:
Storage.php:10
Magento\Framework\Session\Storage\__construct
__construct($namespace='default', array $data=[])
Definition:
Storage.php:25
Magento\Framework\Session\Storage\getNamespace
getNamespace()
Definition:
Storage.php:46
Magento\Framework\DataObject
Definition:
DataObject.php:15
Magento\Framework\Session
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\Session\Storage\$namespace
$namespace
Definition:
Storage.php:17
Magento\Framework\Session\Storage\getData
getData($key='', $clear=false)
Definition:
Storage.php:58
Magento\Framework\DataObject\setData
setData($key, $value=null)
Definition:
DataObject.php:72
Magento\Framework\Session\StorageInterface
Definition:
StorageInterface.php:14
Magento\Framework\Session\Storage\init
init(array $data)
Definition:
Storage.php:34