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:

  1. $cookie=$collection[$cookieName];

  • since: 3.0
  • version: $Id: THttpRequest.php 2244 2007-09-26 13:15:56Z xue $
  • author: Qiang Xue <qiang.xue@gmail.com>

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

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

Constructor.

  • access: public
THttpCookieCollection __construct ([mixed $owner = null])
  • mixed $owner: owner of this collection.

Redefinition of:
TList::__construct()
Constructor.
findCookieByName (line 881)

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

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 868)
  • 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 856)

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 Sun, 30 Sep 2007 19:16:15 -0400 by phpDocumentor 1.3.0RC4