From 01bc363ac789cfb9d644ce82a949da5cd7e1c220 Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 31 Jan 2006 00:01:49 +0000 Subject: Modified TList and TMap implementation so that they can be more easily extended. --- framework/Web/UI/WebControls/TListControl.php | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'framework/Web/UI/WebControls/TListControl.php') diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php index 6faccf31..8d2959b4 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -566,21 +566,6 @@ abstract class TListControl extends TDataBoundControl */ class TListItemCollection extends TList { - /** - * Appends an item to the collection. - * @param TListItem the item to be appended. - * @throws TInvalidDataTypeException if the item being appended is neither a string nor a TListItem - */ - public function add($item) - { - if(is_string($item)) - parent::add(new TListItem($item)); - else if($item instanceof TListItem) - parent::add($item); - else - throw new TInvalidDataTypeException('listitemcollection_item_invalid'); - } - /** * Inserts an item into the collection. * @param integer the location where the item will be inserted. @@ -588,12 +573,12 @@ class TListItemCollection extends TList * @param TListItem the item to be inserted. * @throws TInvalidDataTypeException if the item being inserted is neither a string nor TListItem */ - public function insert($index,$item) + public function insertAt($index,$item) { if(is_string($item)) - parent::insert($index,new TListItem($item)); + parent::insertAt($index,new TListItem($item)); else if($item instanceof TListItem) - parent::insert($index,$item); + parent::insertAt($index,$item); else throw new TInvalidDataTypeException('listitemcollection_item_invalid'); } -- cgit v1.2.3