Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F10770523
LogEntry.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
809 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
)
:
LogEntry
{
$mapper
=
(
new
JsonMapper
());
return
$mapper
->
map
(
$json
,
new
LogEntry
);
}
}
File Metadata
Details
Attached
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)
Attached To
Mode
rAPISRVLOGS Servers log :: Add new entries API
Attached
Detach File
Event Timeline
Log In to Comment