ILIAS  release_8 Revision v8.24
WrapperFactory.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5namespace ILIAS\HTTP\Wrapper;
6
7use Psr\Http\Message\RequestInterface;
8
9/******************************************************************************
10 *
11 * This file is part of ILIAS, a powerful learning management system.
12 *
13 * ILIAS is licensed with the GPL-3.0, you should have received a copy
14 * of said license along with the source code.
15 *
16 * If this is not the case or you just want to try ILIAS, you'll find
17 * us at:
18 * https://www.ilias.de
19 * https://github.com/ILIAS-eLearning
20 *
21 *****************************************************************************/
27{
28 private RequestInterface $request;
29
33 public function __construct(RequestInterface $request)
34 {
35 $this->request = $request;
36 }
37
39 {
40 return new ArrayBasedRequestWrapper($this->request->getQueryParams());
41 }
42
43 public function post(): ArrayBasedRequestWrapper
44 {
45 return new ArrayBasedRequestWrapper($this->request->getParsedBody());
46 }
47
49 {
50 return new ArrayBasedRequestWrapper($this->request->getCookieParams());
51 }
52}
__construct(RequestInterface $request)
WrapperFactory constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...