You are here

class LagoonLogsLogProcessor in Lagoon Logs 8

Hierarchy

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_logs
View 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