PHP Class Amp\Artax\Cookie\ArrayCookieJar

Inheritance: implements Amp\Artax\Cookie\CookieJar
Show file Open project: amphp/artax

Public Methods

Method Description
get ( string $domain, string $path = '', string $name = null ) : array Retrieve all cookies matching the specified constraints
getAll ( ) : array Retrieve all stored cookies
remove ( Cookie $cookie ) : void Remove a specific cookie from storage
removeAll ( ) : void Remove all stored cookies
store ( Cookie $cookie ) : void Store a cookie

Private Methods

Method Description
clearExpiredCookies ( )
matchesDomain ( $requestDomain, $cookieDomain )
matchesPath ( $requestPath, $cookiePath )

Method Details

get() public method

Retrieve all cookies matching the specified constraints
public get ( string $domain, string $path = '', string $name = null ) : array
$domain string
$path string
$name string
return array Returns an array (possibly empty) of all cookie matches

getAll() public method

Retrieve all stored cookies
public getAll ( ) : array
return array Returns array in the format $arr[$domain][$path][$cookieName]

remove() public method

Remove a specific cookie from storage
public remove ( Cookie $cookie ) : void
$cookie Cookie
return void

removeAll() public method

Remove all stored cookies
public removeAll ( ) : void
return void

store() public method

Store a cookie
public store ( Cookie $cookie ) : void
$cookie Cookie
return void