## 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: $Id: THttpRequest.php 2364 2008-01-13 15:27:49Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

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

    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 829)

Constructor.

- access: public

THttpCookieCollection __construct ([mixed $owner = null])

- mixed $owner: owner of this collection.

Redefinition of:

TList::__construct()
  Constructor.

findCookieByName (line 886)

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 842)

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 specified position.
- mixed $item: new item

Redefinition of:

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

itemAt (line 873)

- 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 861)

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::count()
> 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::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> 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, 21 Apr 2008 11:35:08 -0400 by phpDocumentor 1.3.0RC4