Page MenuHomeDevCentral

No OneTemporary

diff --git a/src/LogEntry.php b/src/LogEntry.php
index 7337098..1e7bddc 100644
--- a/src/LogEntry.php
+++ b/src/LogEntry.php
@@ -1,46 +1,46 @@
<?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) : object {
+ public static function fromJSON ($json) : LogEntry {
$mapper = (new JsonMapper());
return $mapper->map($json, new LogEntry);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Nov 25, 04:29 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259531
Default Alt Text
(1 KB)

Event Timeline