| 1 | <?php |
||
| 7 | class Entry |
||
| 8 | { |
||
| 9 | const CHANNELS = [ |
||
| 10 | 'messaging', |
||
| 11 | 'standby' |
||
| 12 | ]; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $id; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | protected $time; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | protected $events; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Entry constructor. |
||
| 31 | * |
||
| 32 | * @param string $id |
||
| 33 | * @param int $time |
||
| 34 | * @param array $events |
||
| 35 | */ |
||
| 36 | public function __construct(string $id, int $time, array $events) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function getId(): string |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return int |
||
| 53 | */ |
||
| 54 | public function getTime(): int |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return array |
||
| 61 | */ |
||
| 62 | public function getEvents(): array |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @param array $entry |
||
| 69 | * |
||
| 70 | * @return \Kerox\Messenger\Model\Callback\Entry |
||
| 71 | */ |
||
| 72 | public static function create(array $entry): Entry |
||
| 86 | } |
||
| 87 |