Class THttpCookieCollection
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];
Constructor Summary |
public |
Constructor.
|
Method Summary |
THttpCookie
|
Finds the cookie with the specified name.
|
void
|
Inserts an item at the specified position.
|
THttpCookie
|
itemAt
( integer|string $index)
|
mixed
|
Removes an item at the specified position.
|
Methods Inherited From TList |
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()
|
Methods 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()
|
Constructor Details |
__construct
Constructor.
|
Method Details |
findCookieByName
Finds the cookie with the specified name.
Input |
string | $name | the name of the cookie to be looked for |
Output |
THttpCookie
| the cookie, null if not found |
Exception |
|
insertAt
public void insertAt |
(integer $index , mixed $item ) |
Inserts an item at the specified position.
This overrides the parent implementation by performing additional operations for each newly added THttpCookie object.
Input |
integer | $index | the specified position. |
mixed | $item | new item |
Output |
Exception |
throws | TInvalidDataTypeException if the item to be inserted is not a THttpCookie object. |
|
itemAt
Input |
integer|string | $index | index of the cookie in the collection or the cookie's name |
Output |
THttpCookie
| the cookie found |
Exception |
|
removeAt
public mixed removeAt |
(integer $index ) |
Removes an item at the specified position.
This overrides the parent implementation by performing additional cleanup work when removing a TCookie object.
Input |
integer | $index | the index of the item to be removed. |
Output |
mixed
| the removed item. |
Exception |
|
|