PluginProbe
WpStream – Live Streaming, Video on Demand, Pay Per View / 4.8
WpStream – Live Streaming, Video on Demand, Pay Per View v4.8
4.14.1 4.14.0 4.13.2 4.13.1 4.13 4.12.5 4.12.4 4.12.3 4.12.2 4.12.1 4.12 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5 4.5.1 4.5.11 4.5.11.1 4.5.11.2 4.5.11.4 4.5.11.5 4.5.11.6 All 181 releases
wpstream / includes / Helpers / class-wpstream-log-entry.php

class-wpstream-log-entry.php in WpStream – Live Streaming, Video on Demand, Pay Per View 4.8, at includes/Helpers/class-wpstream-log-entry.php

49 lines 881 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class WpStream_Log_Entry
5 *
6 * Represents a single log entry in the WpStream logging system.
7 */
8 class WpStream_Log_Entry {
9 /**
10 * The timestamp of the log entry
11 *
12 * @var int
13 */
14 public $timestamp;
15
16 /**
17 * The type of the log entry
18 *
19 * @var string
20 */
21 public $type;
22
23 /*
24 * The description of the log entry
25 *
26 * @var string
27 */
28 public $description;
29
30 /**
31 * Constructor of the log entry
32 *
33 * @param array|null $item Log data
34 *
35 * @return Wpstream_Log_Entry
36 */
37
38 public function __construct( $item = null ) {
39 if ( $item ) {
40 $this->timestamp = isset( $item['timestamp'] ) ? (int) $item['timestamp'] : time();
41 $this->type = isset( $item['type'] ) ? $item['type'] : '';
42 $this->description = $item['description'];
43 } else {
44 $this->timestamp = time();
45 $this->type = '';
46 $this->description = '';
47 }
48 }
49 }