Documentation

CanRetrieveFromInput

Table of Contents

getCookie()  : mixed
Gets a cookie
getCookies()  : array<string|int, mixed>
Alias for getCookie() to get all cookies
getFile()  : mixed
Gets a posted file
getFiles()  : array<string|int, mixed>
Alias for getFile() to get all posted files
getGet()  : mixed
Gets a GET parameter
getPost()  : mixed
Gets a POST parameter

Methods

getCookie()

Gets a cookie

public getCookie([string|null $key = null ][, mixed $default = null ]) : mixed
Parameters
$key : string|null = null

The key of the parameter, null returns all cookies

$default : mixed = null

Default value

Return values
mixed —

The value, $default if the key is missing, or all cookies when $key is null

getCookies()

Alias for getCookie() to get all cookies

public getCookies() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The cookies

getFile()

Gets a posted file

public getFile([string|null $key = null ][, mixed $default = null ]) : mixed
Parameters
$key : string|null = null

The name of the file, null returns all files

$default : mixed = null

Default value if the file is not posted

Return values
mixed —

The $_FILES entry (name, type, tmp_name, error, size), $default if the key is missing, or all files when $key is null

getFiles()

Alias for getFile() to get all posted files

public getFiles() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The posted files

getGet()

Gets a GET parameter

public getGet([string|null $key = null ][, mixed $default = null ]) : mixed
Parameters
$key : string|null = null

The key of the parameter, null returns the whole GET array

$default : mixed = null

Default value

Return values
mixed —

The value, $default if the key is missing, or the whole array when $key is null

getPost()

Gets a POST parameter

public getPost([string|null $key = null ][, mixed $default = null ]) : mixed
Parameters
$key : string|null = null

The key of the parameter, null returns the whole POST array

$default : mixed = null

Default value

Return values
mixed —

The value, $default if the key is missing, or the whole array when $key is null

Search results