19declare(strict_types=1);
28use Psr\Http\Message\ServerRequestInterface;
37 private readonly IliasHttpServices
$http,
44 return $this->
http->request();
59 $this->refinery->kindlyTo()->string(),
60 $this->refinery->custom()->transformation(
static fn(array $value):
string|
int => $value[0])
68 return $this->
get($key, $this->
refinery->custom()->transformation(
69 static fn(array|
string $value): array|
string => $value === self::ALL_OBJECTS || $value[0] === self::ALL_OBJECTS
71 : array_map(
'intval', $value)
77 $wrapper = $this->
http->wrapper();
80 $wrapper->post()->has($key) => $wrapper->post()->retrieve($key, $t),
81 $wrapper->query()->has($key) => $wrapper->query()->retrieve($key, $t),
97 $this->
http->saveResponse($this->
http->response()->withBody($response));
98 $this->
http->sendResponse();
102 public function has(
string $key): bool
104 return $this->
http->wrapper()->query()->has($key) || $this->
http->wrapper()->post()->has($key);
Stream factory which enables the user to create streams without the knowledge of the concrete class.
static ofString(string $string)
Creates a new stream with an initial value.
static ofResource($resource)
Wraps an already created resource with the stream abstraction.
resolveRowParameter(string $key)
__construct(private readonly IliasHttpServices $http, private readonly Refinery $refinery)
resolveRowParameters(string $key)
sendAsync(mixed $response)
readonly HttpService $http
static http()
Fetches the global http state from ILIAS.