1 | <?php |
||
9 | class Payload implements DomainPayloadInterface |
||
10 | { |
||
11 | protected $status; |
||
12 | |||
13 | protected $result; |
||
14 | |||
15 | public function __construct(string $status, array $result) |
||
20 | |||
21 | public function getStatus() : string |
||
25 | |||
26 | public function getResult() : array |
||
30 | |||
31 | public static function created(array $result = []) : Payload |
||
35 | |||
36 | public static function deleted(array $result = []) : Payload |
||
40 | |||
41 | public static function notFound(array $result = []) : Payload |
||
45 | |||
46 | public static function found(array $result = []) : Payload |
||
50 | |||
51 | public static function invalid(array $result = []) : Payload |
||
55 | |||
56 | public static function success(array $result = []) : Payload |
||
60 | |||
61 | public static function updated(array $result = []) : Payload |
||
65 | |||
66 | public static function error(array $result = []) : Payload |
||
70 | |||
71 | public static function processing(array $result = []) : Payload |
||
75 | |||
76 | public static function accepted(array $result = []) : Payload |
||
80 | } |
||
81 |