Documentation

Horde_Support_Array
in package
implements ArrayAccess, Countable, IteratorAggregate

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

Tags
todo
  • Incorporate stuff from Horde_Array?
  • http://docs.python.org/lib/typesmapping.html
category

Horde

license

http://www.horde.org/licenses/bsd

Interfaces, Classes and Traits

ArrayAccess
Countable
IteratorAggregate

Table of Contents

$_array  : mixed
Array variables
__construct()  : mixed
__get()  : mixed
__isset()  : mixed
Checks the existance of $key in this array
__set()  : mixed
__unset()  : mixed
Removes $key from this array
clear()  : mixed
Clear out the array
count()  : int
Count the number of elements
get()  : mixed
getIterator()  : mixed
getKeys()  : array<string|int, mixed>
Get the keys in the array
getOrSet()  : 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.
getValues()  : array<string|int, mixed>
Get the values in the array
offsetExists()  : mixed
Checks the existence of $offset in this array
offsetGet()  : mixed
Gets the value of $offset in this array
offsetSet()  : mixed
Sets the value of $offset to $value
offsetUnset()  : mixed
Removes $offset from this array
pop()  : 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.
update()  : mixed
Update the array with the key/value pairs from $array

Properties

$_array

Array variables

protected mixed $_array = array()

Methods

__construct()

public __construct([mixed $vars = array() ]) : mixed
Parameters
$vars : mixed = array()
Return values
mixed

__get()

public __get(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

__isset()

Checks the existance of $key in this array

public __isset(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

__set()

public __set(mixed $key, mixed $value) : mixed
Parameters
$key : mixed
$value : mixed
Return values
mixed

__unset()

Removes $key from this array

public __unset(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

clear()

Clear out the array

public clear() : mixed
Return values
mixed

count()

Count the number of elements

public count() : int
Return values
int

get()

public get(mixed $key[, mixed $default = null ]) : mixed
Parameters
$key : mixed
$default : mixed = null
Return values
mixed

getIterator()

public getIterator() : mixed
Return values
mixed

getKeys()

Get the keys in the array

public getKeys() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOrSet()

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.

public getOrSet(string $offset[, string $default = null ]) : mixed
Parameters
$offset : string

Offset to retrieve and set if unset

$default : string = null

Default value if $offset does not exist

Return values
mixed

Value at $offset or $default

getValues()

Get the values in the array

public getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

offsetExists()

Checks the existence of $offset in this array

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Tags
see
__isset()
Return values
mixed

offsetGet()

Gets the value of $offset in this array

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Tags
see
__get()
Return values
mixed

offsetSet()

Sets the value of $offset to $value

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Tags
see
__set()
Return values
mixed

offsetUnset()

Removes $offset from this array

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Tags
see
__unset()
Return values
mixed

pop()

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.

public pop(string $offset[, string $default = null ]) : mixed
Parameters
$offset : string

Offset to pop

$default : string = null

Default value

Return values
mixed

Value at $offset or $default

update()

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

public update(array<string|int, mixed> $array) : mixed
Parameters
$array : array<string|int, mixed>

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

Return values
mixed

Search results