PHP Class Prado\Web\THttpCookieCollection

THttpCookieCollection implements a collection class to store cookies. Besides using all functionalities from {@link TList}, you can also retrieve a cookie by its name using either {@link findCookieByName} or simply: $cookie=$collection[$cookieName];
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\Collections\TList
Mostra file Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
__construct ( $owner = null ) Constructor.
findCookieByName ( $name ) : THttpCookie Finds the cookie with the specified name.
insertAt ( $index, $item ) Inserts an item at the specified position.
itemAt ( $index ) : THttpCookie
removeAt ( $index ) : mixed Removes an item at the specified position.

Method Details

__construct() public method

Constructor.
public __construct ( $owner = null )

findCookieByName() public method

Finds the cookie with the specified name.
public findCookieByName ( $name ) : THttpCookie
return THttpCookie the cookie, null if not found

insertAt() public method

This overrides the parent implementation by performing additional operations for each newly added THttpCookie object.
public insertAt ( $index, $item )

itemAt() public method

public itemAt ( $index ) : THttpCookie
return THttpCookie the cookie found

removeAt() public method

This overrides the parent implementation by performing additional cleanup work when removing a TCookie object.
public removeAt ( $index ) : mixed
return mixed the removed item.