Page MenuHomeDevCentral

LogEntry.php
No OneTemporary

LogEntry.php

<?php
namespace Nasqueron\Api\ServersLog;
use JsonMapper;
class LogEntry {
///
/// Public properties
///
public $date = "";
public $emitter = "";
public $source = "";
public $component = "";
public $entry = "";
///
/// Constructor
///
public function __construct () {
$this->date = self::get_current_timestamp();
}
///
/// Helper methods
///
// Helper methods
private static function get_current_timestamp () : string {
// Nasqueron log format: 2016-02-13T23:14:00Z (with a final Z for UTC)
return str_replace("+00:00", "Z", gmdate('c'));
}
public static function fromJSON ($json) : LogEntry {
$mapper = (new JsonMapper());
return $mapper->map($json, new LogEntry);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Jul 28, 09:36 (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2847942
Default Alt Text
LogEntry.php (809 B)

Event Timeline