Request
class Request implements RequestInterface
The global request class
Constants
NO_REWRITE |
|
REWRITE_SEGMENTS_QUERY |
|
Methods
Static constructor : defines the current URL and gets the routes
Constructor : defines the request URL and the object rewrite flag
Populate the request object with current HTTP request values
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Clean the value taken from request arguments or data
No description
Get the current request referer if available
No description
Emulation of internal getallheaders()
function as it does not exist each time
Details
at line 121
static
Request
create(
string $url = null,
int $flag = self::NO_REWRITE,
string $protocol = 'http',
string $method = 'get',
array $headers = null,
array $arguments = null,
array $data = null,
array $session = null,
array $files = null,
array $cookies = null)
Static constructor : defines the current URL and gets the routes
at line 166
__construct(
string $url = null,
int $flag = self::NO_REWRITE)
Constructor : defines the request URL and the object rewrite flag
at line 182
$this
guessFromCurrent()
Populate the request object with current HTTP request values
at line 209
$this
setFlag(
int $flag)
at line 218
int
getFlag()
at line 227
$this
setUrl(
string $url)
at line 236
string|null
getUrl()
at line 245
$this
setProtocol(
string $protocol)
at line 254
string|null
getProtocol()
at line 263
$this
setMethod(
string $method)
at line 272
string|null
getMethod()
at line 281
$this
setHeaders(
array $headers = null)
at line 290
array|null
getHeaders()
at line 299
string|null
getHeader(
string $name)
at line 308
$this
setArguments(
string|array $arguments = null)
at line 326
array|null
getArguments(
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')
at line 340
string
getArgument(
string $param = null,
mixed $default = false,
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')
at line 353
$this
setData(
array|string $data = null)
at line 370
string
getData(
string $param = null,
mixed $default = false,
bool $clean = true,
int $clean_flags = ENT_COMPAT,
string $clean_encoding = 'UTF-8')
at line 388
$this
setFiles(
array $files = null)
at line 397
array|null
getFiles()
at line 407
array|null
getFile(
string $param,
string $index = null)
at line 423
$this
setSession(
array $session = null)
at line 433
array|null
getSession(
string $param = null)
at line 446
$this
setCookies(
array $cookies = null)
at line 455
array|null
getCookies()
at line 464
array|null
getCookie(
string $param)
at line 473
$this
setAuthentication(
array $authentication = null)
at line 483
$this
setAuthenticationType(
string $type)
at line 493
$this
setAuthenticationUser(
string $user)
at line 503
$this
setAuthenticationPassword(
string $pw)
at line 513
array|string|null
getAuthentication(
string $param = null)
at line 529
string
buildUrl()
at line 570
static
bool
isAjax()
at line 579
bool
isCli()
at line 587
bool
isGet()
at line 595
bool
isPost()
at line 603
bool
isPut()
at line 613
mixed|false
getGet(
string $varname,
mixed $default = null)
at line 623
mixed|false
getPost(
string $varname,
mixed $default = null)
at line 633
mixed|false
getGetOrPost(
string $varname,
mixed $default = null)
at line 647
mixed|false
getPostOrGet(
string $varname,
mixed $default = null)
at line 710
static
string
cleanArgument(
string $arg_value,
int $flags = ENT_COMPAT,
string $encoding = 'UTF-8')
Clean the value taken from request arguments or data
at line 728
static
mixed|false
getEnvironment(
string $varname)
at line 738
static
string|null
getReferer()
Get the current request referer if available
at line 746
static
string
getClientIp()
at line 761
static
getallheaders()
Emulation of internal getallheaders()
function as it does not exist each time