Amp\Http\Cookie\RequestCookie classRequestCookie

A cookie as sent in a request's 'cookie' header, so without any attributes.

This class does not deal with encoding of arbitrary names and values. If you want to use arbitrary values, please use an encoding mechanism like Base64 or URL encoding.

Summary

Properties

Methods

Properties

Methods

fromHeader —public functionfromHeader(string$string):Amp\Http\Cookie\RequestCookie[]

Parses the cookies from a 'cookie' header.

Note: Parsing is aborted if there's an invalid value and no cookies are returned.

Type Parameter Description Default Value
string $string Valid 'cookie' header line. none
__construct —public function__construct(string$name,string$value ='')
No documentation.
Type Parameter Description Default Value
string $name Cookie name in its decoded form. none
string $value Cookie value in its decoded form. ''
getName —public functiongetName():string
No documentation.
getValue —public functiongetValue():string
No documentation.
__toString —public function__toString():string
No documentation.