Request
in package
FinalYes
Table of Contents
Constants
- METHOD_GET = 'GET'
- METHOD_PATCH = 'PATCH'
- METHOD_POST = 'POST'
- METHOD_PUT = 'PUT'
Properties
- $cookies : SubRequest
- $files : RequestFiles
- $headers : Headers
- $query : SubRequest
- $request : SubRequest
- $rawInput : string|null
Methods
- __construct() : mixed
- all() : array<string|int, mixed>
- browser() : string
- cookie() : string|null
- createFromGlobals() : self
- file() : UploadedFile|null
- fullUrl() : string
- get() : string|null
- getAlnum() : string
- getArray() : array<string|int, mixed>
- getBasePath() : string
- getBool() : bool|null
- getContent() : string
- getDate() : string|null
- getDateTime() : string|null
- getEmail() : string|null
- getFloat() : float|null
- getHour() : string|null
- getInt() : int|null
- getMethod() : string
- getOnly() : string|null
- getString() : string|null
- getUrl() : string|null
- has() : bool
- header() : string|null
- host() : string
- input() : string|null
- inputOrQuery() : string|null
- ip() : string
- isMethod() : bool
- isSecure() : bool
- json() : mixed
- method() : string
- os() : string
- parseRequestData() : array<string|int, mixed>
- protocol() : string
- query() : string|null
- queryOrInput() : string|null
- url() : string
- urlWithQuery() : string
- userAgent() : string
Constants
METHOD_GET
public
mixed
METHOD_GET
= 'GET'
METHOD_PATCH
public
mixed
METHOD_PATCH
= 'PATCH'
METHOD_POST
public
mixed
METHOD_POST
= 'POST'
METHOD_PUT
public
mixed
METHOD_PUT
= 'PUT'
Properties
$cookies
public
SubRequest
$cookies
$files
public
RequestFiles
$files
$headers
public
Headers
$headers
$query
public
SubRequest
$query
$request
public
SubRequest
$request
$rawInput
private
string|null
$rawInput
Methods
__construct()
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
all()
public
all(string ...$key) : array<string|int, mixed>
use request->all() or query->all() instead
Parameters
- $key : string
Return values
array<string|int, mixed>browser()
public
browser() : string
Return values
stringcookie()
public
cookie(string $key[, mixed $default = null ]) : string|null
Parameters
- $key : string
- $default : mixed = null
Return values
string|nullcreateFromGlobals()
public
static createFromGlobals() : self
Return values
selffile()
public
file(string $key) : UploadedFile|null
Parameters
- $key : string
Return values
UploadedFile|nullfullUrl()
public
fullUrl() : string
Return values
stringget()
public
get(string $key[, mixed $default = null ]) : string|null
use input(), inputOrQuery(), query() or queryOrInput() instead
Parameters
- $key : string
- $default : mixed = null
Return values
string|nullgetAlnum()
public
getAlnum(string $key) : string
use request->getAlnum() or query->getAlnum() instead
Parameters
- $key : string
Return values
stringgetArray()
public
getArray(string $key) : array<string|int, mixed>
use request->getArray() or query->getArray() instead
Parameters
- $key : string
Return values
array<string|int, mixed>getBasePath()
public
getBasePath() : string
Return values
stringgetBool()
public
getBool(string $key[, bool|null $default = null ]) : bool|null
use request->getBool() or query->getBool() instead
Parameters
- $key : string
- $default : bool|null = null
Return values
bool|nullgetContent()
public
getContent() : string
Return values
stringgetDate()
public
getDate(string $key[, string|null $default = null ]) : string|null
use request->getDate() or query->getDate() instead
Parameters
- $key : string
- $default : string|null = null
Return values
string|nullgetDateTime()
public
getDateTime(string $key[, string|null $default = null ]) : string|null
use request->getDateTime() or query->getDateTime() instead
Parameters
- $key : string
- $default : string|null = null
Return values
string|nullgetEmail()
public
getEmail(string $key[, string|null $default = null ]) : string|null
use request->getEmail() or query->getEmail() instead
Parameters
- $key : string
- $default : string|null = null
Return values
string|nullgetFloat()
public
getFloat(string $key[, float|null $default = null ]) : float|null
use request->getFloat() or query->getFloat() instead
Parameters
- $key : string
- $default : float|null = null
Return values
float|nullgetHour()
public
getHour(string $key[, string|null $default = null ]) : string|null
use request->getHour() or query->getHour() instead
Parameters
- $key : string
- $default : string|null = null
Return values
string|nullgetInt()
public
getInt(string $key[, int|null $default = null ]) : int|null
use request->getInt() or query->getInt() instead
Parameters
- $key : string
- $default : int|null = null
Return values
int|nullgetMethod()
public
getMethod() : string
use method() instead
Return values
stringgetOnly()
public
getOnly(string $key, array<string|int, mixed> $values) : string|null
use request->getOnly() or query->getOnly() instead
Parameters
- $key : string
- $values : array<string|int, mixed>
Return values
string|nullgetString()
public
getString(string $key[, string|null $default = null ]) : string|null
use request->getString() or query->getString() instead
Parameters
- $key : string
- $default : string|null = null
Return values
string|nullgetUrl()
public
getUrl(string $key[, string|null $default = null ]) : string|null
use request->getUrl() or query->getUrl() instead
Parameters
- $key : string
- $default : string|null = null
Return values
string|nullhas()
public
has(string ...$key) : bool
Parameters
- $key : string
Return values
boolheader()
public
header(string $key[, mixed $default = null ]) : string|null
Parameters
- $key : string
- $default : mixed = null
Return values
string|nullhost()
public
host() : string
Return values
stringinput()
public
input(string $key[, mixed $default = null ]) : string|null
Parameters
- $key : string
- $default : mixed = null
Return values
string|nullinputOrQuery()
public
inputOrQuery(string $key[, mixed $default = null ]) : string|null
Parameters
- $key : string
- $default : mixed = null
Return values
string|nullip()
public
ip() : string
Return values
stringisMethod()
public
isMethod(string $method) : bool
Parameters
- $method : string
Return values
boolisSecure()
public
isSecure() : bool
Return values
booljson()
public
json([string|null $key = null ][, mixed $default = null ]) : mixed
Parameters
- $key : string|null = null
- $default : mixed = null
method()
public
method() : string
Return values
stringos()
public
os() : string
Return values
stringparseRequestData()
public
static parseRequestData() : array<string|int, mixed>
Return values
array<string|int, mixed>protocol()
public
protocol() : string
Return values
stringquery()
public
query(string $key[, mixed $default = null ]) : string|null
Parameters
- $key : string
- $default : mixed = null
Return values
string|nullqueryOrInput()
public
queryOrInput(string $key[, mixed $default = null ]) : string|null
Parameters
- $key : string
- $default : mixed = null
Return values
string|nullurl()
public
url([int|null $position = null ]) : string
Parameters
- $position : int|null = null
Return values
stringurlWithQuery()
public
urlWithQuery() : string
Return values
stringuserAgent()
public
userAgent() : string