Documentation

rex_context
in package
implements rex_context_provider_interface

A generic implementiation of rex_context_provider.

Tags
author

staabm

Table of Contents

Interfaces

rex_context_provider_interface
Generic interface for classes which provide a complete rex-context.

Methods

__construct()  : mixed
Constructs a rex_context with the given global parameters.
fromGet()  : self
Returns a rex_context instance containing all GET parameters.
fromPost()  : self
Returns a rex_context instance containing all POST parameters.
getHiddenInputFields()  : string
Returns a html string containg hidden input fields for the given parameters.
getParam()  : mixed
Returns the value associated with the given parameter $name.
getParams()  : array<string, mixed>
Returns the global parameters.
getUrl()  : mixed
hasParam()  : bool
Returns whether the given parameter exists.
removeParam()  : void
Removes a global parameter.
restore()  : self
Returns a rex_context instance containing all GET and POST parameters.
setParam()  : void
Set a global parameter.

Methods

__construct()

Constructs a rex_context with the given global parameters.

public __construct([array<string, mixed> $globalParams = [] ]) : mixed
Parameters
$globalParams : array<string, mixed> = []

A array containing only scalar values for key/value

fromGet()

Returns a rex_context instance containing all GET parameters.

public static fromGet() : self
Return values
self

fromPost()

Returns a rex_context instance containing all POST parameters.

public static fromPost() : self
Return values
self

getHiddenInputFields()

Returns a html string containg hidden input fields for the given parameters.

public getHiddenInputFields([array<string|int, mixed> $params = [] ]) : string
Parameters
$params : array<string|int, mixed> = []

A array containing key value pairs for the parameter and its value

Tags
see
rex_context_provider::getHiddenInputFields()
Return values
string

The generated html source containing the hidden input fields

getParam()

Returns the value associated with the given parameter $name.

public getParam(string $name[, mixed $default = null ]) : mixed

When no value is set, $default will be returned.

Parameters
$name : string
$default : mixed = null

getParams()

Returns the global parameters.

public getParams() : array<string, mixed>
Return values
array<string, mixed>

getUrl()

public getUrl([array<string|int, mixed> $params = [] ][, mixed $escape = true ]) : mixed
Parameters
$params : array<string|int, mixed> = []
$escape : mixed = true

hasParam()

Returns whether the given parameter exists.

public hasParam(string $name) : bool
Parameters
$name : string
Return values
bool

removeParam()

Removes a global parameter.

public removeParam(string $name) : void
Parameters
$name : string

restore()

Returns a rex_context instance containing all GET and POST parameters.

public static restore() : self
Return values
self

setParam()

Set a global parameter.

public setParam(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

        
On this page

Search results