Overview

Packages

  • Support

Classes

  • Horde_Support_Array
  • Horde_Support_Backtrace
  • Horde_Support_CombineStream
  • Horde_Support_ConsistentHash
  • Horde_Support_Guid
  • Horde_Support_Inflector
  • Horde_Support_Memory
  • Horde_Support_Numerizer
  • Horde_Support_Numerizer_Locale_Base
  • Horde_Support_Numerizer_Locale_De
  • Horde_Support_Numerizer_Locale_Pt
  • Horde_Support_Randomid
  • Horde_Support_Stack
  • Horde_Support_StringStream
  • Horde_Support_Stub
  • Horde_Support_Timer
  • Horde_Support_Uuid
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Support_Array

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

Horde_Support_Array implements ArrayAccess, Countable, Iterator
Package: Support
Category: Horde
License: http://www.horde.org/licenses/bsd
Located at Horde/Support/Array.php
Methods summary
public
# __construct( mixed $vars = array() )
public
# get( mixed $key, mixed $default = null )
public mixed
# getOrSet( string $offset, string $default = null )

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.

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

$offset
Offset to retrieve and set if unset
$default
Default value if $offset does not exist

Returns

mixed
Value at $offset or $default
public mixed
# pop( string $offset, string $default = null )

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.

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

$offset
Offset to pop
$default
Default value

Returns

mixed
Value at $offset or $default
public
# update( array $array )

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

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

Parameters

$array
Key/value pairs to set/change in the array.
public array
# getKeys( )

Get the keys in the array

Get the keys in the array

Returns

array
public array
# getValues( )

Get the values in the array

Get the values in the array

Returns

array
public
# clear( )

Clear out the array

Clear out the array

public
# __get( mixed $key )
public
# __set( mixed $key, mixed $value )
public
# __isset( mixed $key )

Checks the existance of $key in this array

Checks the existance of $key in this array

public
# __unset( mixed $key )

Removes $key from this array

Removes $key from this array

public integer
# count( )

Count the number of elements

Count the number of elements

Returns

integer

Implementation of

Countable::count()
public
# current( )

Gets the current value of this array's Iterator

Gets the current value of this array's Iterator

Implementation of

Iterator::current()
public
# next( )

Advances this array's Iterator to the next value

Advances this array's Iterator to the next value

Implementation of

Iterator::next()
public
# key( )

Returns the current key of this array's Iterator

Returns the current key of this array's Iterator

Implementation of

Iterator::key()
public
# valid( )

Checks if this array's Iterator is in a valid position

Checks if this array's Iterator is in a valid position

Implementation of

Iterator::valid()
public
# rewind( )

Rewinds this array's Iterator

Rewinds this array's Iterator

Implementation of

Iterator::rewind()
public
# offsetGet( mixed $offset )

Gets the value of $offset in this array

Gets the value of $offset in this array

See

Horde_Support_Array::__get()

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( mixed $offset, mixed $value )

Sets the value of $offset to $value

Sets the value of $offset to $value

See

Horde_Support_Array::__set()

Implementation of

ArrayAccess::offsetSet()
public
# offsetExists( mixed $offset )

Checks the existence of $offset in this array

Checks the existence of $offset in this array

See

Horde_Support_Array::__isset()

Implementation of

ArrayAccess::offsetExists()
public
# offsetUnset( mixed $offset )

Removes $offset from this array

Removes $offset from this array

See

Horde_Support_Array::__unset()

Implementation of

ArrayAccess::offsetUnset()
API documentation generated by ApiGen