for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Drupal\mongodb_watchdog;
use MongoDB\BSON\Unserializable;
/**
* Class Event.
*
* @package Drupal\mongodb_watchdog
*/
class Event implements Unserializable {
const KEYS = [
'_id',
'hostname',
'link',
'location',
'message',
'referrer',
'severity',
'timestamp',
'type',
'uid',
'variables',
];
// @codingStandardsIgnoreStart
* The string representation of a MongoId.
* @var int
public $_id;
// @codingStandardsIgnoreEnd
* User id.
public $uid;
* Event type, often a module name.
* @var string
public $type;
* Event template.
public $message;
* The template parameters.
* @var array
public $variables;
* A RFC5424 severity level.
public $severity;
* A link provided by the event emitter. Optional.
public $link;
* The absolute URL for the path on which the event was logged.
public $location;
* A HTTP referrer for the path on which the event was logged. Optional.
public $referrer;
* The server host.
public $hostname;
* The timestamp at which the event was logged.
public $timestamp;
* Constructor.
* @param array $event
* The event in array form.
public function __construct(array $event) {
$this->bsonUnserialize($event);
}
* {@inheritdoc}
public function bsonUnserialize(array $data) {
foreach (static::KEYS as $key) {
if (isset($data[$key])) {
$this->{$key} = $data[$key];
This check marks files that end in a newline character, i.e. an empy line.
This check marks files that end in a newline character, i.e. an empy line.