From 73512adcb5ed2dca47a03c5e42ec9ebf0a1d9a94 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 17 Dec 2005 03:40:49 +0000 Subject: Changed TList::addAt to TList::insert --- framework/Collections/TList.php | 6 +++--- framework/TComponent.php | 4 ++-- framework/Web/UI/TTemplateControl.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'framework') diff --git a/framework/Collections/TList.php b/framework/Collections/TList.php index d57e0f62..b9fbd589 100644 --- a/framework/Collections/TList.php +++ b/framework/Collections/TList.php @@ -16,7 +16,7 @@ * TList implements an integer-indexed collection class. * * You can access, append, insert, remove an item by using - * {@link itemAt}, {@link add}, {@link addAt}, {@link remove}, and {@link removeAt}. + * {@link itemAt}, {@link add}, {@link insert}, {@link remove}, and {@link removeAt}. * To get the number of the items in the list, use {@link getCount}. * TList can also be used like a regular array as follows, * @@ -123,7 +123,7 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess * @throws TInvalidDataValueException If the index specified exceeds the bound * @throws TInvalidOperationException If the item is not allowed to be added */ - public function addAt($index,$item) + public function insert($index,$item) { if($this->canAddItem($item)) { @@ -307,7 +307,7 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess else { $this->removeAt($offset); - $this->addAt($offset,$item); + $this->insert($offset,$item); } } diff --git a/framework/TComponent.php b/framework/TComponent.php index c1b483c0..1a4dfe6e 100644 --- a/framework/TComponent.php +++ b/framework/TComponent.php @@ -300,12 +300,12 @@ class TComponent * getting and setting properties, e.g., * * $component->Click[]=array($object,'buttonClicked'); - * $component->Click->addAt(0,array($object,'buttonClicked')); + * $component->Click->insert(0,array($object,'buttonClicked')); * * which are equivalent to the following * * $component->getEventHandlers('Click')->add(array($object,'buttonClicked')); - * $component->getEventHandlers('Click')->addAt(0,array($object,'buttonClicked')); + * $component->getEventHandlers('Click')->insert(0,array($object,'buttonClicked')); * * * @param string the event name diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php index e1a2d248..dc4bc567 100644 --- a/framework/Web/UI/TTemplateControl.php +++ b/framework/Web/UI/TTemplateControl.php @@ -173,7 +173,7 @@ class TTemplateControl extends TControl implements INamingContainer if(isset($this->_placeholders[$id])) { list($parent,$loc)=$this->_placeholders[$id]; - $parent->getControls()->addAt($loc,$content); + $parent->getControls()->insert($loc,$content); } } -- cgit v1.2.3