Prado\Web\THttpCookieCollection::itemAt PHP Méthode

itemAt() public méthode

public itemAt ( $index ) : THttpCookie
Résultat THttpCookie the cookie found
    public function itemAt($index)
    {
        if (is_integer($index)) {
            return parent::itemAt($index);
        } else {
            return $this->findCookieByName($index);
        }
    }

Usage Example

 public function testItemAt()
 {
     $coll = new THttpCookieCollection();
     $coll->insertAt(0, new THttpCookie('name', 'value'));
     self::assertEquals('value', $coll->itemAt(0)->getValue());
     self::assertEquals('value', $coll->itemAt('name')->getValue());
 }