redaxo-master/redaxo/src/core/functionsfunction_rex_globals.php

Getter functions for the superglobals.

Functions

rex_get()

rex_get(string  $varname, mixed  $vartype = '', mixed  $default = '') : mixed

Returns the variable $varname of $_GET and casts the value.

Parameters

string $varname

Variable name

mixed $vartype

Variable type

mixed $default

Default value

Returns

mixed —

rex_post()

rex_post(string  $varname, mixed  $vartype = '', mixed  $default = '') : mixed

Returns the variable $varname of $_POST and casts the value.

Parameters

string $varname

Variable name

mixed $vartype

Variable type

mixed $default

Default value

Returns

mixed —

rex_request()

rex_request(string  $varname, mixed  $vartype = '', mixed  $default = '') : mixed

Returns the variable $varname of $_REQUEST and casts the value.

Parameters

string $varname

Variable name

mixed $vartype

Variable type

mixed $default

Default value

Returns

mixed —

rex_server()

rex_server(string  $varname, mixed  $vartype = '', mixed  $default = '') : mixed

Returns the variable $varname of $_SERVER and casts the value.

Parameters

string $varname

Variable name

mixed $vartype

Variable type

mixed $default

Default value

Returns

mixed —

rex_session()

rex_session(string  $varname, mixed  $vartype = '', mixed  $default = '') : mixed

Returns the variable $varname of $_SESSION and casts the value.

Parameters

string $varname

Variable name

mixed $vartype

Variable type

mixed $default

Default value

Throws

\rex_exception

Returns

mixed —

rex_set_session()

rex_set_session(string  $varname, mixed  $value) : mixed

Sets a session variable.

Parameters

string $varname

Variable name

mixed $value

Value

Throws

\rex_exception

Returns

mixed —

rex_unset_session()

rex_unset_session(string  $varname) : mixed

Deletes a session variable.

Parameters

string $varname

Variable name

Throws

\rex_exception

Returns

mixed —

rex_cookie()

rex_cookie(string  $varname, mixed  $vartype = '', mixed  $default = '') : mixed

Returns the variable $varname of $_COOKIE and casts the value.

Parameters

string $varname

Variable name

mixed $vartype

Variable type

mixed $default

Default value

Returns

mixed —

rex_files()

rex_files(string  $varname, mixed  $vartype = '', mixed  $default = '') : mixed

Returns the variable $varname of $_FILES and casts the value.

Parameters

string $varname

Variable name

mixed $vartype

Variable type

mixed $default

Default value

Returns

mixed —

rex_env()

rex_env(string  $varname, mixed  $vartype = '', mixed  $default = '') : mixed

Returns the variable $varname of $_ENV and casts the value.

Parameters

string $varname

Variable name

mixed $vartype

Variable type

mixed $default

Default value

Returns

mixed —

rex_request_method()

rex_request_method() : string

Returns the HTTP method of the current request.

Returns

string —

HTTP method in lowercase (head,get,post,put,delete)