\Horde_Support_Array

Copyright 2007-2017 Horde LLC (http://www.horde.org/)

Summary

Methods
Properties
Constants
__construct()
get()
getOrSet()
pop()
update()
getKeys()
getValues()
clear()
__get()
__set()
__isset()
__unset()
count()
getIterator()
offsetGet()
offsetSet()
offsetExists()
offsetUnset()
No public properties found
No constants found
No protected methods found
$_array
N/A
No private methods found
No private properties found
N/A

Properties

$_array

$_array : 

Array variables

Type

Methods

__construct()

__construct(  $vars = array()) 

Parameters

$vars

get()

get(  $key,   $default = null) 

Parameters

$key
$default

getOrSet()

getOrSet(string  $offset, string  $default = null) : mixed

Gets the value at $offset. If no value exists at that offset, or the value $offset is NULL, then $default is set as the value of $offset.

Parameters

string $offset

Offset to retrieve and set if unset

string $default

Default value if $offset does not exist

Returns

mixed —

Value at $offset or $default

pop()

pop(string  $offset, string  $default = null) : mixed

Gets the value at $offset and deletes it from the array. If no value exists at $offset, or the value at $offset is null, then $default will be returned.

Parameters

string $offset

Offset to pop

string $default

Default value

Returns

mixed —

Value at $offset or $default

update()

update(array  $array) 

Update the array with the key/value pairs from $array

Parameters

array $array

Key/value pairs to set/change in the array.

getKeys()

getKeys() : array

Get the keys in the array

Returns

array

getValues()

getValues() : array

Get the values in the array

Returns

array

clear()

clear() 

Clear out the array

__get()

__get(  $key) 

Parameters

$key

__set()

__set(  $key,   $value) 

Parameters

$key
$value

__isset()

__isset(  $key) 

Checks the existance of $key in this array

Parameters

$key

__unset()

__unset(  $key) 

Removes $key from this array

Parameters

$key

count()

count() : integer

Count the number of elements

Returns

integer

getIterator()

getIterator() 

offsetGet()

offsetGet(  $offset) 

Gets the value of $offset in this array

Parameters

$offset

offsetSet()

offsetSet(  $offset,   $value) 

Sets the value of $offset to $value

Parameters

$offset
$value

offsetExists()

offsetExists(  $offset) 

Checks the existence of $offset in this array

Parameters

$offset

offsetUnset()

offsetUnset(  $offset) 

Removes $offset from this array

Parameters

$offset