-
Notifications
You must be signed in to change notification settings - Fork 0
/
Input (1).php
35 lines (32 loc) · 1.15 KB
/
Input (1).php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
class Input
{
/**
* Check if a given value was passed in the request
*
* @param string $key index to look for in request
* @return boolean whether value exists in $_POST or $_GET
*/
public static function has($key)
{
// TODO: Fill in this function
}
/**
* Get a requested value from either $_POST or $_GET
*
* @param string $key index to look for in index
* @param mixed $default default value to return if key not found
* @return mixed value passed in request
*/
public static function get($key, $default = null)
{
// TODO: Fill in this function
}
///////////////////////////////////////////////////////////////////////////
// DO NOT EDIT ANYTHING BELOW!! //
// The Input class should not ever be instantiated, so we prevent the //
// constructor method from being called. We will be covering private //
// later in the curriculum. //
///////////////////////////////////////////////////////////////////////////
private function __construct() {}
}