Request
class Request (View source)
Methods
Get current HTTP path or route path
Check if is a specific HTTP method, HTTPS, and xmlhttprequest (Depends on how an ajax call was made)
Get HTTP headers from current request
Get querystring, this method is useful for anyone who uses IIS.
Get a value from $_GET
, if $_GET
is a array multidimensional, you can use dot like path:
If $_GET['foo']
returns this array( 'baz' => 'bar' => 1);
use Request::get('foo.bar.baz');
for return 1
Get a value from $_POST, if $_POST is a array multidimensional, you can use dot like path: If $_POST['foo'] returns this array( 'baz' => 'bar' => 1); use Request::post('foo.bar.baz');
Get a value from $_COOKIE
(support path using dots)
Get a value from $_FILES
(support path using dots)
Get a value input handler
Details
at line 27
static string
path(bool $info = false)
Get current HTTP path or route path
at line 38
static bool
is(string $check)
Check if is a specific HTTP method, HTTPS, and xmlhttprequest (Depends on how an ajax call was made)
at line 73
static string|array|null
header(string $name = null)
Get HTTP headers from current request
at line 92
static string|null
query()
Get querystring, this method is useful for anyone who uses IIS.
at line 110
static mixed
get(string $key, mixed $alternative = null)
Get a value from $_GET
, if $_GET
is a array multidimensional, you can use dot like path:
If $_GET['foo']
returns this array( 'baz' => 'bar' => 1);
use Request::get('foo.bar.baz');
for return 1
at line 123
static mixed
post(string $key, mixed $alternative = null)
Get a value from $_POST, if $_POST is a array multidimensional, you can use dot like path: If $_POST['foo'] returns this array( 'baz' => 'bar' => 1); use Request::post('foo.bar.baz');
at line 135
static mixed
cookie(string $key, mixed $alternative = null)
Get a value from $_COOKIE
(support path using dots)
at line 146
static mixed
file(string $key)
Get a value from $_FILES
(support path using dots)
at line 182
static resource|bool
raw(bool $binary = true)
Get a value input handler