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