PHP Класс Habari\SuperGlobal

Наследование: extends ArrayIterator
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$raw_values
$values

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
base_filter ( mixed $value ) : mixes Recursively filter array values and strings using InputFilter::filter()

Описание методов

__construct() публичный Метод

public __construct ( $array )

base_filter() защищенный Метод

Recursively filter array values and strings using InputFilter::filter()
protected base_filter ( mixed $value ) : mixes
$value mixed A value to filter
Результат mixes The filtered value

current() публичный Метод

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

escape() публичный Метод

We escape with htmletities with the ENT_QUOTE flag.
public escape ( mixed $index ) : mixed
$index mixed The index of the value
Результат mixed The unfiltered value

filter_keys() публичный Метод

Filters this SuperGlobal based on an array or arrays of keys
public filter_keys ( ) : SuperGlobal
Результат SuperGlobal The values from this array that match the supplied keys

getArrayCopy() публичный Метод

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

get_array_copy_raw() публичный Метод

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

map() публичный Метод

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
Результат SuperGlobal the result of the mapping

merge() публичный Метод

Merges the contents of one or more arrays or ArrayObjects with this SuperGlobal
public merge ( ) : SuperGlobal
Результат SuperGlobal The merged array

offsetGet() публичный Метод

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
Результат mixed The filtered value at the array index

offsetSet() публичный Метод

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() публичный статический Метод

Convert $_COOKIE into SuperGlobal instance
public static process_c ( )

process_gps() публичный статический Метод

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

raw() публичный Метод

Return the raw, unfiltered value of the requested index
public raw ( mixed $index ) : mixed
$index mixed The index of the value
Результат mixed The unfiltered value

rekey() публичный Метод

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
Результат SuperGlobal The re-keyed array

Описание свойств

$raw_values защищенное свойство

protected $raw_values

$values защищенное свойство

protected $values