xref: /dokuwiki/inc/Input/Get.php (revision ccc4c71ca88c25bcefb7f42eb01f0c040487e3a9)
1*ccc4c71cSAndreas Gohr<?php
2*ccc4c71cSAndreas Gohr
3*ccc4c71cSAndreas Gohrnamespace dokuwiki\Input;
4*ccc4c71cSAndreas Gohr
5*ccc4c71cSAndreas Gohr/**
6*ccc4c71cSAndreas Gohr * Internal class used for $_GET access in dokuwiki\Input\Input class
7*ccc4c71cSAndreas Gohr */
8*ccc4c71cSAndreas Gohrclass Get extends Input
9*ccc4c71cSAndreas Gohr{
10*ccc4c71cSAndreas Gohr    /** @noinspection PhpMissingParentConstructorInspection
11*ccc4c71cSAndreas Gohr     * Initialize the $access array, remove subclass members
12*ccc4c71cSAndreas Gohr     */
13*ccc4c71cSAndreas Gohr    public function __construct()
14*ccc4c71cSAndreas Gohr    {
15*ccc4c71cSAndreas Gohr        $this->access = &$_GET;
16*ccc4c71cSAndreas Gohr    }
17*ccc4c71cSAndreas Gohr
18*ccc4c71cSAndreas Gohr    /**
19*ccc4c71cSAndreas Gohr     * Sets a parameter in $_GET and $_REQUEST
20*ccc4c71cSAndreas Gohr     *
21*ccc4c71cSAndreas Gohr     * @param string $name Parameter name
22*ccc4c71cSAndreas Gohr     * @param mixed $value Value to set
23*ccc4c71cSAndreas Gohr     */
24*ccc4c71cSAndreas Gohr    public function set($name, $value)
25*ccc4c71cSAndreas Gohr    {
26*ccc4c71cSAndreas Gohr        parent::set($name, $value);
27*ccc4c71cSAndreas Gohr        $_REQUEST[$name] = $value;
28*ccc4c71cSAndreas Gohr    }
29*ccc4c71cSAndreas Gohr}
30