PHP Class Habari\SuperGlobal

Inheritance: extends ArrayIterator
Afficher le fichier Open project: habari/system

Protected Properties

Свойство Type Description
$raw_values
$values

Méthodes publiques

Méthode Description
__construct ( $array )
current ( ) Return the current array element, filtered. Implements ArrayIterator::current()
escape ( mixed $index ) : mixed Return the raw, escaped value of the requested index.
filter_keys ( ) : SuperGlobal Filters this SuperGlobal based on an array or arrays of keys
getArrayCopy ( ) Return a copy of the filtered array. Implments ArrayIterator::getArrayCopy()
get_array_copy_raw ( ) Return a copy of the unfiltered array.
map ( callback $fn ) : SuperGlobal Apply a map function to this array, like array_map()
merge ( ) : SuperGlobal Merges the contents of one or more arrays or ArrayObjects with this SuperGlobal
offsetGet ( mixed $index ) : mixed Return the value of an array offset. Allows the values to be filtered
offsetSet ( mixed $index, mixed $value ) Set the value of the array, clear caches for that index
process_c ( ) Convert $_COOKIE into SuperGlobal instance
process_gps ( ) Convert $_GET, $_POST and $_SERVER into SuperGlobal instances, also kill $_REQUEST
raw ( mixed $index ) : mixed Return the raw, unfiltered value of the requested index
rekey ( string $replacement = '{\$$0}', string $search_regex = '/^.*$/' ) : SuperGlobal Use a regular expression replacement to change the keys in an array

Méthodes protégées

Méthode Description
base_filter ( mixed $value ) : mixes Recursively filter array values and strings using InputFilter::filter()

Method Details

__construct() public méthode

public __construct ( $array )

base_filter() protected méthode

Recursively filter array values and strings using InputFilter::filter()
protected base_filter ( mixed $value ) : mixes
$value mixed A value to filter
Résultat mixes The filtered value

current() public méthode

Return the current array element, filtered. Implements ArrayIterator::current()
public current ( )

escape() public méthode

We escape with htmletities with the ENT_QUOTE flag.
public escape ( mixed $index ) : mixed
$index mixed The index of the value
Résultat mixed The unfiltered value

filter_keys() public méthode

Filters this SuperGlobal based on an array or arrays of keys
public filter_keys ( ) : SuperGlobal
Résultat SuperGlobal The values from this array that match the supplied keys

getArrayCopy() public méthode

Return a copy of the filtered array. Implments ArrayIterator::getArrayCopy()
public getArrayCopy ( )

get_array_copy_raw() public méthode

Return a copy of the unfiltered array.
public get_array_copy_raw ( )

map() public méthode

Apply a map function to this array, like array_map()
public map ( callback $fn ) : SuperGlobal
$fn callback the name of the function to map through
Résultat SuperGlobal the result of the mapping

merge() public méthode

Merges the contents of one or more arrays or ArrayObjects with this SuperGlobal
public merge ( ) : SuperGlobal
Résultat SuperGlobal The merged array

offsetGet() public méthode

Return the value of an array offset. Allows the values to be filtered
public offsetGet ( mixed $index ) : mixed
$index mixed The index of the array
Résultat mixed The filtered value at the array index

offsetSet() public méthode

Set the value of the array, clear caches for that index
public offsetSet ( mixed $index, mixed $value )
$index mixed The array index
$value mixed Tha value to store

process_c() public static méthode

Convert $_COOKIE into SuperGlobal instance
public static process_c ( )

process_gps() public static méthode

Convert $_GET, $_POST and $_SERVER into SuperGlobal instances, also kill $_REQUEST
public static process_gps ( )

raw() public méthode

Return the raw, unfiltered value of the requested index
public raw ( mixed $index ) : mixed
$index mixed The index of the value
Résultat mixed The unfiltered value

rekey() public méthode

Use a regular expression replacement to change the keys in an array
public rekey ( string $replacement = '{\$$0}', string $search_regex = '/^.*$/' ) : SuperGlobal
$replacement string (optional) The regex replacement value
$search_regex string (optional) The regex search value
Résultat SuperGlobal The re-keyed array

Property Details

$raw_values protected_oe property

protected $raw_values

$values protected_oe property

protected $values