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
Log
Writer
Abstract.php
Go to the documentation of this file.
1
<?php
24
#require_once 'Zend/Log/Filter/Priority.php';
25
34
abstract
class
Zend_Log_Writer_Abstract
implements
Zend_Log_FactoryInterface
35
{
39
protected
$_filters
= array();
40
46
protected
$_formatter
;
47
56
public
function
addFilter
($filter)
57
{
58
if
(is_int($filter)) {
59
$filter =
new
Zend_Log_Filter_Priority
($filter);
60
}
61
62
if
(!$filter instanceof
Zend_Log_Filter_Interface
) {
64
#require_once 'Zend/Log/Exception.php';
65
throw
new
Zend_Log_Exception
(
'Invalid filter provided'
);
66
}
67
68
$this->_filters[] = $filter;
69
return
$this;
70
}
71
78
public
function
write($event)
79
{
81
foreach
($this->_filters as $filter) {
82
if
(!$filter->accept($event)) {
83
return
;
84
}
85
}
86
87
// exception occurs on error
88
$this->
_write
($event);
89
}
90
97
public
function
setFormatter
(
Zend_Log_Formatter_Interface
$formatter)
98
{
99
$this->_formatter = $formatter;
100
return
$this;
101
}
102
108
public
function
shutdown
()
109
{}
110
117
abstract
protected
function
_write
($event);
118
126
static
protected
function
_parseConfig
(
$config
)
127
{
128
if
(
$config
instanceof
Zend_Config
) {
129
$config
=
$config
->toArray();
130
}
131
132
if
(!is_array(
$config
)) {
133
#require_once 'Zend/Log/Exception.php';
134
throw
new
Zend_Log_Exception
(
135
'Configuration must be an array or instance of Zend_Config'
136
);
137
}
138
139
return
$config
;
140
}
141
}
Zend_Log_Filter_Priority
Definition:
Priority.php:34
Zend_Log_Writer_Abstract\setFormatter
setFormatter(Zend_Log_Formatter_Interface $formatter)
Definition:
Abstract.php:97
Zend_Log_Writer_Abstract\_write
_write($event)
Zend_Log_Writer_Abstract\addFilter
addFilter($filter)
Definition:
Abstract.php:56
$config
$config
Definition:
fraud_order.php:17
Zend_Log_Writer_Abstract\shutdown
shutdown()
Definition:
Abstract.php:108
Zend_Log_Writer_Abstract\$_formatter
$_formatter
Definition:
Abstract.php:46
Zend_Log_Formatter_Interface
Definition:
Interface.php:31
Zend_Log_Filter_Interface
Definition:
Interface.php:31
Zend_Log_Writer_Abstract\_parseConfig
static _parseConfig($config)
Definition:
Abstract.php:126
Zend_Config
Zend_Log_Writer_Abstract\$_filters
$_filters
Definition:
Abstract.php:39
Zend_Log_FactoryInterface
Definition:
FactoryInterface.php:29
Zend_Log_Writer_Abstract
Definition:
Abstract.php:34
Zend_Log_Exception
Definition:
Exception.php:32