Documentation

CookieJar
in package
implements Countable, IteratorAggregate

FinalYes

Cookie Jar holds a set of Cookies.

Tags
author

Márk Sági-Kazár mark.sagikazar@gmail.com

Table of Contents

Interfaces

Countable
IteratorAggregate

Properties

$cookies  : SplObjectStorage<Cookie, mixed>

Methods

__construct()  : mixed
addCookie()  : mixed
Adds a cookie.
addCookies()  : mixed
Adds some cookies.
clear()  : mixed
Removes all cookies.
count()  : mixed
getCookies()  : array<string|int, Cookie>
Returns the cookies.
getIterator()  : mixed
getMatchingCookies()  : array<string|int, Cookie>
Returns all matching cookies.
hasCookie()  : bool
Checks if there is a cookie.
hasCookies()  : bool
Checks if there are cookies.
removeCookie()  : mixed
Removes a cookie.
removeCookies()  : mixed
Removes some cookies.
removeMatchingCookies()  : mixed
Removes cookies which match the given parameters.
setCookies()  : mixed
Sets the cookies and removes any previous one.
findMatchingCookies()  : array<string|int, Cookie>
Finds matching cookies based on a callable.

Properties

Methods

addCookies()

Adds some cookies.

public addCookies(array<string|int, Cookie$cookies) : mixed
Parameters
$cookies : array<string|int, Cookie>

clear()

Removes all cookies.

public clear() : mixed

count()

public count() : mixed
Attributes
#[ReturnTypeWillChange]

getCookies()

Returns the cookies.

public getCookies() : array<string|int, Cookie>
Return values
array<string|int, Cookie>

getIterator()

public getIterator() : mixed
Attributes
#[ReturnTypeWillChange]

getMatchingCookies()

Returns all matching cookies.

public getMatchingCookies(Cookie $cookie) : array<string|int, Cookie>
Parameters
$cookie : Cookie
Return values
array<string|int, Cookie>

hasCookie()

Checks if there is a cookie.

public hasCookie(Cookie $cookie) : bool
Parameters
$cookie : Cookie
Return values
bool

hasCookies()

Checks if there are cookies.

public hasCookies() : bool
Return values
bool

removeCookie()

Removes a cookie.

public removeCookie(Cookie $cookie) : mixed
Parameters
$cookie : Cookie

removeCookies()

Removes some cookies.

public removeCookies(array<string|int, Cookie$cookies) : mixed
Parameters
$cookies : array<string|int, Cookie>

removeMatchingCookies()

Removes cookies which match the given parameters.

public removeMatchingCookies([string|null $name = null ][, string|null $domain = null ][, string|null $path = null ]) : mixed

Null means that parameter should not be matched

Parameters
$name : string|null = null
$domain : string|null = null
$path : string|null = null

setCookies()

Sets the cookies and removes any previous one.

public setCookies(array<string|int, Cookie$cookies) : mixed
Parameters
$cookies : array<string|int, Cookie>

findMatchingCookies()

Finds matching cookies based on a callable.

private findMatchingCookies(callable $match) : array<string|int, Cookie>
Parameters
$match : callable
Return values
array<string|int, Cookie>

        
On this page

Search results