summaryrefslogtreecommitdiff
path: root/framework/Collections/TList.php
diff options
context:
space:
mode:
authorxue <>2006-02-17 21:14:12 +0000
committerxue <>2006-02-17 21:14:12 +0000
commitcba0c1b472cec22e4ffed2b3b084bea27cd26582 (patch)
tree9a8f8383a93ebb011757423bfc8b39066cb017ea /framework/Collections/TList.php
parent35836e45fab30dc4c31a4f51e32b551181e7ec86 (diff)
Fixed #54.
Diffstat (limited to 'framework/Collections/TList.php')
-rw-r--r--framework/Collections/TList.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/Collections/TList.php b/framework/Collections/TList.php
index 7383b684..3480edc3 100644
--- a/framework/Collections/TList.php
+++ b/framework/Collections/TList.php
@@ -132,12 +132,16 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess
* The list will first search for the item.
* The first item found will be removed from the list.
* @param mixed the item to be removed.
+ * @return integer the index at which the item is being removed
* @throws TInvalidDataValueException If the item does not exist
*/
public function remove($item)
{
if(($index=$this->indexOf($item))>=0)
+ {
$this->removeAt($index);
+ return $index;
+ }
else
throw new TInvalidDataValueException('list_item_inexistent');
}