## Class THttpCookieCollection

Description

THttpCookieCollection class.

THttpCookieCollection implements a collection class to store cookies. Besides using all functionalities from TList, you can also retrieve a cookie by its name using either findCookieByName or simply:

       $cookie=$collection[$cookieName];

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

Located in /Web/THttpRequest.php (line 729)

    TComponent
       |
       --TList
          |
          --THttpCookieCollection

Method Summary
THttpCookieCollection __construct ([mixed $owner = null])
THttpCookie findCookieByName (string $name)
void insertAt (integer $index, mixed $item)
THttpCookie itemAt (integer|string $index)
mixed removeAt (integer $index)
Methods
Constructor __construct (line 740)

Constructor.

- access: public

THttpCookieCollection __construct ([mixed $owner = null])

- mixed $owner: owner of this collection.

Redefinition of:

TList::__construct()
  Constructor.

findCookieByName (line 797)

Finds the cookie with the specified name.

- return: the cookie, null if not found
- access: public

THttpCookie findCookieByName (string $name)

- string $name: the name of the cookie to be looked for

insertAt (line 753)

Inserts an item at the specified position.

This overrides the parent implementation by performing additional operations for each newly added THttpCookie object.

- access: public
- throws: TInvalidDataTypeException if the item to be inserted is not a THttpCookie object.

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.

itemAt (line 784)

- return: the cookie found
- access: public

THttpCookie itemAt (integer|string $index)

- integer|string $index: index of the cookie in the collection or the cookie's name

Redefinition of:

TList::itemAt()
  Returns the item at the specified offset.

removeAt (line 772)

Removes an item at the specified position.

This overrides the parent implementation by performing additional cleanup work when removing a TCookie object.

- 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 Mon, 01 May 2006 23:03:37 -0400 by phpDocumentor 1.3.0RC4