19declare(strict_types=1);
43 private readonly DataFactory
$data =
new DataFactory(),
49 return $this->data->text()->markdown()->simpleDocument(
50 "Reports the status of the installation.\n\n"
51 .
"Not available yet: nobody is allowed to perform it."
57 return $f->section([],
'Get the status of the installation');
63 $this->data->text()->markdown()->simpleDocument(
'The status of the installation.'),
79 throw new \LogicException(
'The status of the installation is not available yet.');
88 return $this->data->
error(
89 new \DomainException(
'You are not allowed to get the status of the installation.', 403)
94 return $this->data->ok($this->
perform($raw_parameters));
95 }
catch (\Exception
$e) {
96 return $this->data->error(
$e);
This describes some datastructure in terms of standard data structures such as primitives,...
This is a stub: the status of the installation is not collected yet.
isAllowedToPerform(int $usr_id, mixed $parameters)
Nobody, until there is something to report and a check for administrators to guard it.
getOutputDescription(Description\Factory $f)
perform(mixed $parameters)
This shall perform the activity.
__construct(private readonly DataFactory $data=new DataFactory(),)
getInputDescription(FieldFactory $f)
maybePerformAs(InputFactory $input_factory, int $usr_id, array $raw_parameters)
A result encapsulates a value or an error and simplifies the handling of those.
error()
Get the encapsulated error.