CookieJar
class CookieJar implements QueueingFactory (View source)
Properties
protected string | $path | The default path (if specified). | |
protected string | $domain | The default domain (if specified). | |
protected bool | $secure | The default secure setting (defaults to false). | |
protected array | $queued | All of the cookies queued for sending. |
Methods
Cookie | make(string $name, string $value, int $minutes, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true) Create a new cookie instance. | |
Cookie | forever(string $name, string $value, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true) Create a cookie that lasts "forever" (five years). | |
Cookie | forget(string $name, string $path = null, string $domain = null) Expire the given cookie. | |
bool | hasQueued(string $key) Determine if a cookie has been queued. | |
Cookie | queued(string $key, mixed $default = null) Get a queued cookie instance. | |
void | queue() Queue a cookie to send with the next response. | |
unqueue(string $name) Remove a cookie from the queue. | ||
array | getPathAndDomain(string $path, string $domain, bool $secure = false) Get the path and domain, or the default values. | |
$this | setDefaultPathAndDomain(string $path, string $domain, bool $secure = false) Set the default path and domain for the jar. | |
array | getQueuedCookies() Get the cookies which have been queued for the next request. |
Details
Cookie make(string $name, string $value, int $minutes, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
Create a new cookie instance.
Cookie forever(string $name, string $value, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
Create a cookie that lasts "forever" (five years).
Cookie forget(string $name, string $path = null, string $domain = null)
Expire the given cookie.
bool hasQueued(string $key)
Determine if a cookie has been queued.
Cookie queued(string $key, mixed $default = null)
Get a queued cookie instance.
void queue()
Queue a cookie to send with the next response.
unqueue(string $name)
Remove a cookie from the queue.
protected array getPathAndDomain(string $path, string $domain, bool $secure = false)
Get the path and domain, or the default values.
$this setDefaultPathAndDomain(string $path, string $domain, bool $secure = false)
Set the default path and domain for the jar.
array getQueuedCookies()
Get the cookies which have been queued for the next request.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Cookie/CookieJar.html