Class rex_request

Class for getting the superglobals.

Package: redaxo\core
Located at redaxo/src/core/lib/request.php

Methods summary

public static mixed
# get( string $varname, string $vartype = '', mixed $default = '' )

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

public static mixed
# post( string $varname, string $vartype = '', mixed $default = '' )

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

public static mixed
# request( string $varname, string $vartype = '', mixed $default = '' )

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

public static mixed
# server( string $varname, string $vartype = '', mixed $default = '' )

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

public static mixed
# session( string $varname, string $vartype = '', mixed $default = '' )

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

public static
# setSession( string $varname, mixed $value )

Sets a session variable.

public static
# unsetSession( string $varname )

Deletes a session variable.

public static
# clearSession( )

clear redaxo session contents within the current namespace (the session itself stays alive).

public static mixed
# files( string $varname, string $vartype = '', mixed $default = '' )

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

public static mixed
# env( string $varname, string $vartype = '', mixed $default = '' )

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

public static string
# requestMethod( )

Returns the HTTP method of the current request.

public static boolean
# isXmlHttpRequest( )

Returns true if the request is a XMLHttpRequest.

public static
# isPJAXRequest( )

Returns true if the request is a PJAX-Request.

public static boolean
# isPJAXContainer( string $containerId )

Returns true when the current request is a PJAX-Request and the requested container matches the given $containerId.

public static boolean
# isHttps( )

Returns whether the current request is served via https/ssl.

public static string
# getSessionNamespace( )

Returns the session namespace for the current http request.