class Cookie

Cookie

Methods

static ResponseInterface|boolean
delete(string $name, ResponseInterface|null $response = null, string $domain = '')

Delete cookie

static ResponseInterface|boolean
add(string $name, string $value, ResponseInterface|null $response = null, integer $expire = 360, string $domain = '', string|null $sameSite = null)

Add cookie

static mixed
get(string $name, ServerRequestInterface|null $request = null, mixed $default = null)

Get cookie

static string
getAgeParam(integer $minutes)

Get max age cookie param

static string
getExpireParam(integer $minutes)

Get expires cookie param

Details

at line 27
static ResponseInterface|boolean delete(string $name, ResponseInterface|null $response = null, string $domain = '')

Delete cookie

Parameters

string $name
ResponseInterface|null $response
string $domain

Return Value

ResponseInterface|boolean

at line 52
static ResponseInterface|boolean add(string $name, string $value, ResponseInterface|null $response = null, integer $expire = 360, string $domain = '', string|null $sameSite = null)

Add cookie

Parameters

string $name
string $value
ResponseInterface|null $response
integer $expire Minutes
string $domain
string|null $sameSite

Return Value

ResponseInterface|boolean

at line 79
static mixed get(string $name, ServerRequestInterface|null $request = null, mixed $default = null)

Get cookie

Parameters

string $name
ServerRequestInterface|null $request
mixed $default

Return Value

mixed

at line 92
static protected string getAgeParam(integer $minutes)

Get max age cookie param

Parameters

integer $minutes

Return Value

string

at line 103
static protected string getExpireParam(integer $minutes)

Get expires cookie param

Parameters

integer $minutes

Return Value

string