Factory
in
Table of Contents
- forever() : Cookie
- Create a cookie that lasts "forever" (five years).
- forget() : Cookie
- Expire the given cookie.
- make() : Cookie
- Create a new cookie instance.
Methods
forever()
Create a cookie that lasts "forever" (five years).
public
forever(string $name, string $value[, string $path = null ][, string $domain = null ][, bool $secure = false ][, bool $httpOnly = true ]) : Cookie
Parameters
- $name : string
- $value : string
- $path : string = null
- $domain : string = null
- $secure : bool = false
- $httpOnly : bool = true
Return values
Cookie —forget()
Expire the given cookie.
public
forget(string $name[, string $path = null ][, string $domain = null ]) : Cookie
Parameters
- $name : string
- $path : string = null
- $domain : string = null
Return values
Cookie —make()
Create a new cookie instance.
public
make(string $name, string $value, int $minutes[, string $path = null ][, string $domain = null ][, bool $secure = false ][, bool $httpOnly = true ]) : Cookie
Parameters
- $name : string
- $value : string
- $minutes : int
- $path : string = null
- $domain : string = null
- $secure : bool = false
- $httpOnly : bool = true