API Documentation (v0.9.0-alpha)

Avolutions\Http\CookieCollection

The CookieCollection provides the functionality to store and retrieve Cookie objects.

Methods

Method Visibility Description
add() public Adds a new Cookie object. Will call the native php setcookie method.
delete() public Deletes a cookie by its name.
get() public Returns the value of a cookie by its name.

Method Details

add()

Adds a new Cookie object. Will call the native php setcookie method.

public static add(Cookie $Cookie) : mixed
Parameters

Cookie $Cookie
The Cookie object to add.

Return values
mixed Adds a new Cookie object. Will call the native php setcookie method.
delete()

Deletes a cookie by its name.

public static delete(string $name) : mixed
Parameters

string $name
The name of the cookie.

Return values
mixed Deletes a cookie by its name.
get()

Returns the value of a cookie by its name.

public static get(string $name) : mixed
Parameters

string $name
The name of the cookie.

Return values
mixed Returns the value of a cookie by its name.