Implements interfaces:
TList class
TList implements an integer-indexed collection class.
You can access, append, insert, remove an item by using itemAt, add, insert, remove, and removeAt. To get the number of the items in the list, use getCount. TList can also be used like a regular array as follows,
- $list[]=$item; // append at the end
- $list[$index]=$item; // $index must be between 0 and $list->Count
- unset($list[$index]); // remove the item at $index
- if(isset($list[$index])) // if the list has an item at $index
- foreach($list as $index=>$item) // traverse each item in the list
- $n=count($list); // returns the number of items in the list
To extend TList by doing additional operations with each addition or removal operation, override insertAt(), and removeAt().
Located in /Collections/TList.php (line 39)
TComponent | --TList
Class | Description |
---|---|
TCacheDependencyList | TCacheDependencyList class. |
TPagedList | TPagedList class |
TAuthorizationRuleCollection | TAuthorizationRuleCollection class. |
THttpCookieCollection | THttpCookieCollection class. |
TControlCollection | TControlCollection class |
TDataGridItemCollection | TDataGridItemCollection class. |
TDataGridColumnCollection | TDataGridColumnCollection class. |
TDataListItemCollection | TDataListItemCollection class. |
TMetaTagCollection | TMetaTagCollection class |
THotSpotCollection | THotSpotCollection class. |
TListItemCollection | TListItemCollection class. |
TRepeaterItemCollection | TRepeaterItemCollection class. |
TWizardStepCollection | TWizardStepCollection class. |
TRssFeedItemList | TRssFeedItemList class |
TXmlElementList | TXmlElementList class. |
Constructor.
Initializes the list with an array or an iterable object.
Appends an item at the end of the list.
Removes all items in the list.
Copies iterable data into the list.
Note, existing data in the list will be cleared first.
Returns the number of items in the list.
This method is required by Countable interface.
Returns an iterator for traversing the items in the list.
This method is required by the interface IteratorAggregate.
Inserts an item at the specified position.
Original item at the position and the next items will be moved one step towards the end.
Returns the item at the specified offset.
This method is exactly the same as offsetGet.
Merges iterable data into the map.
New data will be appended to the end of the existing data.
Returns whether there is an item at the specified offset.
This method is required by the interface ArrayAccess.
Returns the item at the specified offset.
This method is required by the interface ArrayAccess.
Sets the item at the specified offset.
This method is required by the interface ArrayAccess.
Unsets the item at the specified offset.
This method is required by the interface ArrayAccess.
Removes an item from the list.
The list will first search for the item. The first item found will be removed from the list.
Removes an item at the specified position.
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Sun, 14 Jan 2007 21:43:05 -0500 by phpDocumentor 1.3.0RC4