function_rex_globals.php
Getter functions for the superglobals.
Table of Contents
Functions
- rex_get() : mixed
- Returns the variable $varname of $_GET and casts the value.
- rex_post() : mixed
- Returns the variable $varname of $_POST and casts the value.
- rex_request() : mixed
- Returns the variable $varname of $_REQUEST and casts the value.
- rex_server() : mixed
- Returns the variable $varname of $_SERVER and casts the value.
- rex_session() : mixed
- Returns the variable $varname of $_SESSION and casts the value.
- rex_set_session() : void
- Sets a session variable.
- rex_unset_session() : void
- Deletes a session variable.
- rex_cookie() : mixed
- Returns the variable $varname of $_COOKIE and casts the value.
- rex_files() : mixed
- Returns the variable $varname of $_FILES and casts the value.
- rex_env() : mixed
- Returns the variable $varname of $_ENV and casts the value.
- rex_request_method() : string
- Returns the HTTP method of the current request.
Functions
rex_get()
Returns the variable $varname of $_GET and casts the value.
rex_get(string $varname[, mixed $vartype = '' ][, mixed $default = '' ]) : mixed
Parameters
- $varname : string
-
Variable name
- $vartype : mixed = ''
-
Variable type
- $default : mixed = ''
-
Default value
Tags
rex_post()
Returns the variable $varname of $_POST and casts the value.
rex_post(string $varname[, mixed $vartype = '' ][, mixed $default = '' ]) : mixed
Parameters
- $varname : string
-
Variable name
- $vartype : mixed = ''
-
Variable type
- $default : mixed = ''
-
Default value
Tags
rex_request()
Returns the variable $varname of $_REQUEST and casts the value.
rex_request(string $varname[, mixed $vartype = '' ][, mixed $default = '' ]) : mixed
Parameters
- $varname : string
-
Variable name
- $vartype : mixed = ''
-
Variable type
- $default : mixed = ''
-
Default value
Tags
rex_server()
Returns the variable $varname of $_SERVER and casts the value.
rex_server(string $varname[, mixed $vartype = '' ][, mixed $default = '' ]) : mixed
Parameters
- $varname : string
-
Variable name
- $vartype : mixed = ''
-
Variable type
- $default : mixed = ''
-
Default value
Tags
rex_session()
Returns the variable $varname of $_SESSION and casts the value.
rex_session(string $varname[, mixed $vartype = '' ][, mixed $default = '' ]) : mixed
Parameters
- $varname : string
-
Variable name
- $vartype : mixed = ''
-
Variable type
- $default : mixed = ''
-
Default value
Tags
rex_set_session()
Sets a session variable.
rex_set_session(string $varname, mixed $value) : void
Parameters
- $varname : string
-
Variable name
- $value : mixed
-
Value
Tags
rex_unset_session()
Deletes a session variable.
rex_unset_session(string $varname) : void
Parameters
- $varname : string
-
Variable name
Tags
rex_cookie()
Returns the variable $varname of $_COOKIE and casts the value.
rex_cookie(string $varname[, mixed $vartype = '' ][, mixed $default = '' ]) : mixed
Parameters
- $varname : string
-
Variable name
- $vartype : mixed = ''
-
Variable type
- $default : mixed = ''
-
Default value
Tags
rex_files()
Returns the variable $varname of $_FILES and casts the value.
rex_files(string $varname[, mixed $vartype = '' ][, mixed $default = '' ]) : mixed
Parameters
- $varname : string
-
Variable name
- $vartype : mixed = ''
-
Variable type
- $default : mixed = ''
-
Default value
Tags
rex_env()
Returns the variable $varname of $_ENV and casts the value.
rex_env(string $varname[, mixed $vartype = '' ][, mixed $default = '' ]) : mixed
Parameters
- $varname : string
-
Variable name
- $vartype : mixed = ''
-
Variable type
- $default : mixed = ''
-
Default value
Tags
rex_request_method()
Returns the HTTP method of the current request.
rex_request_method() : string
Tags
Return values
string —HTTP method in lowercase (head,get,post,put,delete)