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