1 | <?php |
||
25 | class CommonBody implements Body |
||
26 | { |
||
27 | /** |
||
28 | * @var object|null |
||
29 | */ |
||
30 | public $result; |
||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | public $principal; |
||
35 | /** |
||
36 | * @var mixed |
||
37 | */ |
||
38 | public $error; |
||
39 | /** |
||
40 | * @var string|null |
||
41 | */ |
||
42 | public $id; |
||
43 | /** |
||
44 | * @var string|null |
||
45 | */ |
||
46 | public $version; |
||
47 | |||
48 | public function __construct($result, string $principal, $error, ?string $id = null, ?string $version = null) |
||
56 | |||
57 | /** |
||
58 | * {@inheritDoc} |
||
59 | */ |
||
60 | public function getResult() |
||
64 | |||
65 | /** |
||
66 | * {@inheritDoc} |
||
67 | */ |
||
68 | public function getPrincipal(): string |
||
72 | |||
73 | /** |
||
74 | * {@inheritDoc} |
||
75 | */ |
||
76 | public function hasError(): bool |
||
80 | |||
81 | /** |
||
82 | * {@inheritDoc} |
||
83 | */ |
||
84 | public function getError() |
||
88 | |||
89 | /** |
||
90 | * {@inheritDoc} |
||
91 | * @see \Gnumoksha\FreeIpa\Infra\Rpc\Request\CommonBody will send id as string |
||
92 | */ |
||
93 | public function getId(): ?string |
||
97 | |||
98 | /** |
||
99 | * {@inheritDoc} |
||
100 | */ |
||
101 | public function getVersion(): ?string |
||
105 | |||
106 | /** |
||
107 | * {@inheritDoc} |
||
108 | */ |
||
109 | public function jsonSerialize() |
||
119 | } |
||
120 |