| @@ 131-139 (lines=9) @@ | ||
| 128 | */ |
|
| 129 | public function getValue() |
|
| 130 | { |
|
| 131 | if ($this->type == self::TYPE_GET) { |
|
| 132 | if (!filter_has_var(INPUT_GET, $this->key) && isset($_GET[$this->key])) { |
|
| 133 | return $_GET[$this->key]; |
|
| 134 | } |
|
| 135 | if ($this->isMulti()) { |
|
| 136 | return filter_input(INPUT_GET, $this->key, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY); |
|
| 137 | } |
|
| 138 | return filter_input(INPUT_GET, $this->key); |
|
| 139 | } |
|
| 140 | if ($this->type == self::TYPE_POST) { |
|
| 141 | if (!filter_has_var(INPUT_POST, $this->key) && isset($_POST[$this->key])) { |
|
| 142 | return $_POST[$this->key]; |
|
| @@ 140-148 (lines=9) @@ | ||
| 137 | } |
|
| 138 | return filter_input(INPUT_GET, $this->key); |
|
| 139 | } |
|
| 140 | if ($this->type == self::TYPE_POST) { |
|
| 141 | if (!filter_has_var(INPUT_POST, $this->key) && isset($_POST[$this->key])) { |
|
| 142 | return $_POST[$this->key]; |
|
| 143 | } |
|
| 144 | if ($this->isMulti()) { |
|
| 145 | return filter_input(INPUT_POST, $this->key, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY); |
|
| 146 | } |
|
| 147 | return filter_input(INPUT_POST, $this->key); |
|
| 148 | } |
|
| 149 | if ($this->type == self::TYPE_FILE) { |
|
| 150 | if (isset($_FILES[$this->key])) { |
|
| 151 | if ($this->isMulti()) { |
|