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
Serialize
Serializer
Serialize.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Serialize\Serializer
;
7
8
use
Magento\Framework\Serialize\SerializerInterface
;
9
14
class
Serialize
implements
SerializerInterface
15
{
19
public
function
serialize
(
$data
)
20
{
21
if
(
is_resource
(
$data
)) {
22
throw
new \InvalidArgumentException(
'Unable to serialize value.'
);
23
}
24
return
serialize
(
$data
);
25
}
26
30
public
function
unserialize
($string)
31
{
32
if
(
false
=== $string ||
null
=== $string ||
''
=== $string) {
33
throw
new \InvalidArgumentException(
'Unable to unserialize value.'
);
34
}
35
set_error_handler(
36
function
() {
37
restore_error_handler();
38
throw
new \InvalidArgumentException(
'Unable to unserialize value, string is corrupted.'
);
39
},
40
E_NOTICE
41
);
42
$result
=
unserialize
($string, [
'allowed_classes'
=>
false
]);
43
restore_error_handler();
44
return
$result
;
45
}
46
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\Serialize\Serializer
Definition:
Base64Json.php:6
Magento\Framework\Serialize\SerializerInterface
Definition:
SerializerInterface.php:14
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\Serialize\Serializer\Serialize\serialize
serialize($data)
Definition:
Serialize.php:19
Magento\Framework\Serialize\Serializer\Serialize
Definition:
Serialize.php:14
Magento\Setup\Model\Cron\is_resource
is_resource()
Definition:
JobFactoryTest.php:220
Magento\Framework\Serialize\Serializer\Serialize\unserialize
unserialize($string)
Definition:
Serialize.php:30