1 | <?php |
||
9 | trait JSendStatusTrait |
||
10 | { |
||
11 | /** |
||
12 | * @var Status |
||
13 | */ |
||
14 | private $status; |
||
15 | |||
16 | /** |
||
17 | * @return Status |
||
18 | */ |
||
19 | final public function getStatus(): Status |
||
23 | |||
24 | /** |
||
25 | * @return bool |
||
26 | */ |
||
27 | final public function isFail(): bool |
||
31 | |||
32 | /** |
||
33 | * @return bool |
||
34 | */ |
||
35 | final public function isSuccess(): bool |
||
39 | |||
40 | /** |
||
41 | * @return bool |
||
42 | */ |
||
43 | final public function isError(): bool |
||
47 | |||
48 | /** |
||
49 | * @param callable $closure |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | final public function onSuccess(callable $closure): bool |
||
63 | |||
64 | /** |
||
65 | * @param callable $closure |
||
66 | * |
||
67 | * @return bool |
||
68 | */ |
||
69 | final public function onFail(callable $closure): bool |
||
79 | |||
80 | /** |
||
81 | * @param callable $closure |
||
82 | * |
||
83 | * @return bool |
||
84 | */ |
||
85 | final public function onError(callable $closure): bool |
||
95 | } |
||
96 |