Gumbo_List



List Class

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Implements interfaces:

Child classes:

Class Variables

array $_list = array () [line 38]

Class Methods

public Gumbo_List __construct ( [array $list] ) [line 46]

Constructor

Parameter(s):

  • (array) $list
Overridden in child classes as:
Gumbo_Setting::__construct()
Constructor
Gumbo_Load_Setting::__construct()
Constructor


[ Top ]
public void add ( mixed $data, [int|string $key] ) [line 99]

Adds a new Item to the List

Parameter(s):

  • (mixed) $data
  • (int|string) $key
  • throws:  Gumbo_Exception
Overridden in child classes as:
Gumbo_Setting::add()
Adds a pair value to the setting
Gumbo_Load_Setting::add()
Adds a key=>value pair to the setting

Implementation of:
Gumbo_Interface_List::add()

[ Top ]
public bool exists ( [int|string $key] ) [line 218]

Returns if the Key exists, or if the List contains data

Parameter(s):

  • (int|string) $key
Implementation of:
Gumbo_Interface_List::exists()

[ Top ]
public mixed get ( int|string $key ) [line 182]

Returns a single Value

Parameter(s):

  • (int|string) $key
  • precondition:  exists($key)
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_List::get()

[ Top ]
public array getAll ( ) [line 201]

Returns the entire List

Implementation of:
Gumbo_Interface_List::getAll()

[ Top ]
public Iterator getIterator ( ) [line 243]

Returns an Iterator

Implementation of:
IteratorAggregate::getIterator

[ Top ]
public void remove ( int|string $key ) [line 123]

Removes an Item from the List

Parameter(s):

  • (int|string) $key
  • precondition:  exists($key)
  • throws:  Gumbo_Exception
Overridden in child classes as:
Gumbo_Load_Setting::remove()
Removes the setting

Implementation of:
Gumbo_Interface_List::remove()

[ Top ]
public void removeValue ( mixed $data ) [line 145]

Removes a value from the List

Parameter(s):

  • (mixed) $data
  • throws:  Gumbo_Exception
Overridden in child classes as:
Gumbo_Setting::removeValue()
Removes a value from the List (not used)

Implementation of:
Gumbo_Interface_List::removeValue()

[ Top ]
public void reset ( ) [line 168]

Resets the List

  • postcondition:  !size()
Implementation of:
Gumbo_Interface_List::reset()

[ Top ]
public int size ( ) [line 209]

Returns the size of the list

Implementation of:
Gumbo_Interface_List::size()

[ Top ]
public mixed __get ( int|string $key ) [line 60]

Returns Data (wrapper to get())

Parameter(s):

  • (int|string) $key :: for integers, use $list->{$num}
Implementation of:
Gumbo_Interface_List::__get()

[ Top ]
public bool __isset ( int|string $key ) [line 78]

Returns if key is set (wrapper to exists())

Parameter(s):

  • (int|string) $key
Implementation of:
Gumbo_Interface_List::__isset()

[ Top ]
public void __set ( int|string $key, mixed $data ) [line 69]

Sets Data (wrapper to add())

Parameter(s):

  • (int|string) $key
  • (mixed) $data
Implementation of:
Gumbo_Interface_List::__set()

[ Top ]
public void __unset ( int|string $key ) [line 86]

Removes Data (wrapper to remove())

Parameter(s):

  • (int|string) $key
Implementation of:
Gumbo_Interface_List::__unset()

[ Top ]