## Class TControlCollection

Description

TControlCollection class

TControlCollection implements a collection that enables controls to maintain a list of their child controls.

- since: 3.0
- version: $Revision: $ $Date: $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/TControl.php (line 1660)

    TComponent
       |
       --TList
          |
          --TControlCollection

Direct descendents

Class | Description
--- | ---
TEmptyControlCollection | TEmptyControlCollection class
TViewCollection | TViewCollection class.
TTableRowCollection | TTableRowCollection class.
TTableCellCollection | TTableCellCollection class.

Method Summary
TControlCollection __construct (TControl $owner, [boolean $readOnly = false])
void clear ()
TControl getOwner ()
void insertAt (integer $index, mixed $item)
mixed removeAt (integer $index)
Methods
Constructor __construct (line 1673)

Constructor.

- access: public

TControlCollection __construct (TControl $owner, [boolean $readOnly = false])

- TControl $owner: the control that owns this collection.
- boolean $readOnly: whether the list is read-only

Redefinition of:

TList::__construct()
  Constructor.

Redefined in descendants as:

- TEmptyControlCollection::__construct() : Constructor.

clear (line 1726)

Overrides the parent implementation by invoking TControl::clearNamingContainer

- access: public

void clear ()

Redefinition of:

TList::clear()
  Removes all items in the list.

getOwner (line 1682)

- return: the control that owns this collection.
- access: protected

TControl getOwner ()
insertAt (line 1695)

Inserts an item at the specified position.

This overrides the parent implementation by performing additional operations for each newly added child control.

- access: public
- throws: TInvalidDataTypeException if the item to be inserted is neither a string nor a TControl.

void insertAt (integer $index, mixed $item)

- integer $index: the speicified position.
- mixed $item: new item

Redefinition of:

TList::insertAt()
  Inserts an item at the specified position.

Redefined in descendants as:

- TViewCollection::insertAt() : Inserts an item at the specified position.
- TTableRowCollection::insertAt() : Inserts an item at the specified position.
- TTableCellCollection::insertAt() : Inserts an item at the specified position.

removeAt (line 1715)

Removes an item at the specified position.

This overrides the parent implementation by performing additional cleanup work when removing a child control.

- return: the removed item.
- access: public

mixed removeAt (integer $index)

- integer $index: the index of the item to be removed.

Redefinition of:

TList::removeAt()
  Removes an item at the specified position.

#### Inherited Methods

Inherited From TList

> TList::__construct()
> TList::add()
> TList::clear()
> TList::contains()
> TList::copyFrom()
> TList::getCount()
> TList::getIterator()
> TList::getReadOnly()
> TList::indexOf()
> TList::insertAt()
> TList::itemAt()
> TList::mergeWith()
> TList::offsetExists()
> TList::offsetGet()
> TList::offsetSet()
> TList::offsetUnset()
> TList::remove()
> TList::removeAt()
> TList::setReadOnly()
> TList::toArray()

Inherited From TComponent

> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> 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, 04 Jun 2006 18:58:57 -0400 by phpDocumentor 1.3.0RC4