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
zendframework1
library
Zend
Filter
Compress
Lzf.php
Go to the documentation of this file.
1
<?php
25
#require_once 'Zend/Filter/Compress/CompressInterface.php';
26
35
class
Zend_Filter_Compress_Lzf
implements
Zend_Filter_Compress_CompressInterface
36
{
40
public
function
__construct
()
41
{
42
if
(!extension_loaded(
'lzf'
)) {
43
#require_once 'Zend/Filter/Exception.php';
44
throw
new
Zend_Filter_Exception
(
'This filter needs the lzf extension'
);
45
}
46
}
47
54
public
function
compress
(
$content
)
55
{
56
$compressed = lzf_compress(
$content
);
57
if
(!$compressed) {
58
#require_once 'Zend/Filter/Exception.php';
59
throw
new
Zend_Filter_Exception
(
'Error during compression'
);
60
}
61
62
return
$compressed;
63
}
64
71
public
function
decompress
(
$content
)
72
{
73
$compressed = lzf_decompress(
$content
);
74
if
(!$compressed) {
75
#require_once 'Zend/Filter/Exception.php';
76
throw
new
Zend_Filter_Exception
(
'Error during compression'
);
77
}
78
79
return
$compressed;
80
}
81
87
public
function
toString
()
88
{
89
return
'Lzf'
;
90
}
91
}
Zend_Filter_Compress_CompressInterface
Definition:
CompressInterface.php:30
Zend_Filter_Compress_Lzf
Definition:
Lzf.php:35
Zend_Filter_Exception
Definition:
Exception.php:36
Zend_Filter_Compress_Lzf\__construct
__construct()
Definition:
Lzf.php:40
Zend_Filter_Compress_Lzf\toString
toString()
Definition:
Lzf.php:87
$content
$content
Definition:
downloadable_product_with_files_and_sample_url.php:93
Zend_Filter_Compress_Lzf\decompress
decompress($content)
Definition:
Lzf.php:71
Zend_Filter_Compress_Lzf\compress
compress($content)
Definition:
Lzf.php:54