Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56957734
LogEntry.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
807 B
Referenced Files
None
Subscribers
None
LogEntry.php
View Options
<?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
{
$mapper
=
(
new
JsonMapper
());
return
$mapper
->
map
(
$json
,
new
LogEntry
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 13, 17:44 (2 d, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4254518
Default Alt Text
LogEntry.php (807 B)
Attached To
Mode
rAPISRVLOGS Servers log :: Add new entries API
Attached
Detach File
Event Timeline
Log In to Comment