Event::getPayload()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
1
<?php namespace C4tech\RayEmitter\Contracts\Domain;
2
3
use stdClass;
4
5
interface Event
6
{
7
    /**
8
     * Get ID
9
     *
10
     * Access the globally unique identifier for the related Entity/Aggregate.
11
     * @return string
12
     */
13
    public function getId();
14
15
    /**
16
     * Get Payload
17
     *
18
     * Return the data payload for the Event.
19
     * @return mixed
20
     */
21
    public function getPayload();
22
23
    /**
24
     * Serialize
25
     *
26
     * Reduce payload data to a JSON string for storage.
27
     * @return string JSON
28
     */
29
    public function serialize();
30
31
    /**
32
     * Unserialize
33
     *
34
     * Restore payload data from a stored JSON string.
35
     * @param  stdClass $record Stored Event record
36
     * @return static
37
     */
38
    public static function unserialize($record);
39
}
40