class LagoonLogsLogProcessor in Lagoon Logs 8
Hierarchy
- class \Drupal\lagoon_logs\LagoonLogsLogProcessor
Expanded class hierarchy of LagoonLogsLogProcessor
1 file declares its use of LagoonLogsLogProcessor
- LagoonLogsLogger.php in src/
Logger/ LagoonLogsLogger.php
File
- src/
LagoonLogsLogProcessor.php, line 7
Namespace
Drupal\lagoon_logsView source
class LagoonLogsLogProcessor {
protected $processData;
public function __construct(array $processData) {
$this->processData = $processData;
}
/**
* @param array $record
*
* @return array
*/
public function __invoke(array $record) {
foreach ($this->processData as $key => $value) {
if (empty($record[$key])) {
$record[$key] = $value;
}
}
return $record;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LagoonLogsLogProcessor:: |
protected | property | ||
LagoonLogsLogProcessor:: |
public | function | ||
LagoonLogsLogProcessor:: |
public | function |