From cba0c1b472cec22e4ffed2b3b084bea27cd26582 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 17 Feb 2006 21:14:12 +0000 Subject: Fixed #54. --- framework/Collections/TList.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'framework/Collections/TList.php') 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'); } -- cgit v1.2.3