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
Get a value input handler
Details
static string
path(bool $info = false)
Get current HTTP path or route path
static bool
is(string $check)
Check if is a specific HTTP method, HTTPS, and xmlhttprequest (Depends on how an ajax call was made)
static string|null
header(string $name, $alternative = null)
Get HTTP headers from current request
static string|null
query()
Get querystring, this method is useful for anyone who uses IIS.
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
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');
static mixed
cookie(string $key, mixed $alternative = null)
Get a value from $_COOKIE (support path using dots)
static mixed
file(string $key)
Get a value from $_FILES (support path using dots)
static resource|bool
raw(bool $binary = true)
Get a value input handler
static
json(bool $array = false)
Get a value input handler
static Document
xml()
Create a Document instance from HTTP request