class tree: 68Classifieds |
index: 68Classifieds |
all elements
Constructor __construct (line 50)
Constructor ArrayWrapper (line 39)
exists (line 120)
existsLoose (line 131)
get (line 63)
getArrayRef (line 185)
getByIndex (line 89)
remove (line 206)
set (line 109)
setArray (line 195)
trim (line 165)
trimAll (line 151)
ArrayWrapper
Description
ArrayWrapper class For controlled access and manipulation of associative arrays
Located in /includes/classes/wrapper/ArrayWrapper.php (line 19)
Direct descendents
| Class | Description |
|---|---|
GetWrapper
|
SuperglobalWrapper.php |
PostWrapper
|
ArrayWrapper class For controlled access and manipulation of associative arrays |
CookieWrapper
|
ArrayWrapper class For controlled access and manipulation of associative arrays |
Method Summary
Variables
Methods
Constructor __construct (line 50)
PHP5 Constructor
- array $arr: Reference to desired associative array
- &$arr
Constructor ArrayWrapper (line 39)
PHP4 constructor wrapping the PHP5 one for forward compatibility
- array $arr: Reference to desired associative array
- &$arr
exists (line 120)
Determine if array key exists
bool
exists
(string $key)
- string $key: Key to be checked for existence
existsLoose (line 131)
Determine if array key exists OR has usable value
bool
existsLoose
(string $key)
- string $key: Key to be checked
get (line 63)
Retrieve value of given key
mixed
get
(string $key, [mixed $default = false])
- string $key: Key of value to be retrieved
- mixed $default: Value to return if key value is not found
getArrayRef (line 185)
Retrieve a reference to the wrapped array
array
&getArrayRef
()
getByIndex (line 89)
Retrieve value of given key
mixed
getByIndex
(string $key, mixed $index)
- string $key: Key of value to be retrieved
- mixed $index: Index to retrieve
remove (line 206)
Remove the key/value pair for the given key from the array
bool
remove
(string $key)
- string $key: Key to be removed
set (line 109)
Set value of given key
void
set
(string $key, string $value)
- string $key: Key of data to replace with $value
- string $value: New value for $key
Redefined in descendants as:
setArray (line 195)
Set a new wrapped array
void
setArray
( &$array)
- &$array
trim (line 165)
Trim whitespace from string values, recursively if necessary, for the given key
void
trim
(string $key)
- string $key: Key of the value to be trimmed
trimAll (line 151)
Apply ArrayWrapper::trim() to each element of the array
void
trimAll
()

