Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3767957
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
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)
Attached To
Mode
rAPISRVLOGS Servers log :: Add new entries API
Attached
Detach File
Event Timeline
Log In to Comment