Definition at line 34 of file Db.php.
◆ __construct()
__construct |
( |
|
$db, |
|
|
|
$table, |
|
|
|
$columnMap = null |
|
) |
| |
Class constructor
- Parameters
-
Zend_Db_Adapter | $db | Database adapter instance |
string | $table | Log table in database |
array | $columnMap | |
- Returns
- void
Definition at line 65 of file Db.php.
69 $this->_columnMap = $columnMap;
◆ _write()
Write a message to the log.
- Parameters
-
- Returns
- void
- Exceptions
-
Definition at line 127 of file Db.php.
129 if ($this->_db ===
null) {
130 #require_once 'Zend/Log/Exception.php'; 134 if ($this->_columnMap ===
null) {
135 $dataToInsert = $event;
137 $dataToInsert = array();
138 foreach ($this->_columnMap as $columnName => $fieldKey) {
139 if (isset($event[$fieldKey])) {
140 $dataToInsert[$columnName] = $event[$fieldKey];
145 $this->_db->insert($this->_table, $dataToInsert);
◆ factory()
static factory |
( |
|
$config | ) |
|
|
static |
◆ setFormatter()
Formatting is not possible on this writer
- Returns
- void
- Exceptions
-
Definition at line 104 of file Db.php.
106 #require_once 'Zend/Log/Exception.php';
◆ shutdown()
Remove reference to database adapter
- Returns
- void
Definition at line 115 of file Db.php.
◆ $_columnMap
◆ $_db
◆ $_table
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Log/Writer/Db.php