ILIAS  release_8 Revision v8.23
WrapperFactory.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 namespace ILIAS\HTTP\Wrapper;
6 
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 {
29 
33  public function __construct(RequestInterface $request)
34  {
35  $this->request = $request;
36  }
37 
38  public function query(): ArrayBasedRequestWrapper
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 
48  public function cookie(): ArrayBasedRequestWrapper
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...