Todo List
TCollection implements basic collection functionalities. It requires SPL support of PHP 5. You can use a TCollection object like an array with cardinal indexes starting from 0. For example,
$collection=new TCollection; $collection[]='item 1'; $collection[]='item 2'; unset($collection[0]);
$collection=new TCollection; $collection->add('item 1'); $collection->addAt(0,'item 2'); $collection->removeAt(0); $collection->clear();
foreach($collection as $item) { }
[line 257]
[line 262]
TCollection __construct( [mixed $data = null], [boolean $readOnly = false])
Overridden in child classes as:
void add( mixed $item)
void addAt( integer $index, mixed $item)
Original item at the position and the next items will be moved one step towards the end.
void clear( )
boolean contains( mixed $item)
mixed current( )
This method should only be used by framework and component developers.
array getArray( )
integer indexOf( mixed $item)
boolean isReadOnly( )
integer key( )
integer length( )
void next( )
boolean offsetExists( integer $offset)
mixed offsetGet( integer $offset)
void offsetSet( mixed $offset, mixed $item)
Do not call this method.
void offsetUnset( mixed $offset)
boolean onAddItem( mixed $item)
void onRemoveItem( mixed $item)
void remove( mixed $item)
The collection will first search for the item. The first item found will be removed from the collection.
void removeAt( integer $index)
void rewind( )
boolean valid( )