| @@ 5-23 (lines=19) @@ | ||
| 2 | ||
| 3 | namespace fieldwork\methods; |
|
| 4 | ||
| 5 | class GET extends Method |
|
| 6 | { |
|
| 7 | ||
| 8 | public function getFormAttributes () |
|
| 9 | { |
|
| 10 | return array('method' => 'GET'); |
|
| 11 | } |
|
| 12 | ||
| 13 | public function getValue ($key, $default) |
|
| 14 | { |
|
| 15 | return isset($_GET[$key]) ? $_GET[$key] : $default; |
|
| 16 | } |
|
| 17 | ||
| 18 | public function hasValue ($key) |
|
| 19 | { |
|
| 20 | return isset($_GET[$key]); |
|
| 21 | } |
|
| 22 | ||
| 23 | } |
|
| @@ 5-23 (lines=19) @@ | ||
| 2 | ||
| 3 | namespace fieldwork\methods; |
|
| 4 | ||
| 5 | class POST extends Method |
|
| 6 | { |
|
| 7 | ||
| 8 | public function getFormAttributes () |
|
| 9 | { |
|
| 10 | return array('method' => 'POST'); |
|
| 11 | } |
|
| 12 | ||
| 13 | public function getValue ($key, $default) |
|
| 14 | { |
|
| 15 | return isset($_POST[$key]) ? $_POST[$key] : $default; |
|
| 16 | } |
|
| 17 | ||
| 18 | public function hasValue ($key) |
|
| 19 | { |
|
| 20 | return isset($_POST[$key]); |
|
| 21 | } |
|
| 22 | ||
| 23 | } |
|