Spec-Zone.ru › Laravel 5.6

CookieJar

class CookieJar implements QueueingFactory (View source)

Свойства

InteractsWithTime

Свойства

protected string $path Путь по умолчанию (если задан).
protected string $domain Домен по умолчанию (если задан).
protected bool $secure Значение secure по умолчанию (по умолчанию false).
protected string $sameSite Значение SameSite по умолчанию (если задано).
protected Cookie[] $queued Все cookie, ожидающие отправки.

Методы

int secondsUntil(DateTimeInterface|DateInterval|int $delay)

Количество секунд до указанного DateTime.

из InteractsWithTime
int availableAt(DateTimeInterface|DateInterval|int $delay)

Маркер времени (UNIX timestamp) доступности.

из InteractsWithTime
DateTimeInterface|int parseDateInterval(DateTimeInterface|DateInterval|int $delay)

Если значение — интервал, преобразует его в DateTime.

из InteractsWithTime
int currentTime()

Текущее время системы в формате UNIX timestamp.

из InteractsWithTime
Cookie make(string $name, string $value, int $minutes, string $path = null, string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null)

Создать новый экземпляр cookie.

Cookie forever(string $name, string $value, string $path = null, string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null)

Создать cookie, действующую "вечно" (пять лет).

Cookie forget(string $name, string $path = null, string $domain = null)

Удалить заданную cookie.

bool hasQueued(string $key)

Определяет, существует ли cookie в очереди.

Cookie queued(string $key, mixed $default = null)

Получить экземпляр cookie из очереди.

void queue(array $parameters)

Поместить cookie в очередь для отправки с ответом.

unqueue(string $name)

Удалить cookie из очереди.

array getPathAndDomain(string $path, string $domain, bool|null $secure = null, string $sameSite = null)

Получить путь и домен, или значения по умолчанию.

$this setDefaultPathAndDomain(string $path, string $domain, bool $secure = false, string $sameSite = null)

Установить путь и домен по умолчанию для контейнера.

array getQueuedCookies()

Получить cookies, ожидающие отправки.

Подробное описание

protected int secondsUntil(DateTimeInterface|DateInterval|int $delay)

Количество секунд до указанного DateTime.

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

int

protected int availableAt(DateTimeInterface|DateInterval|int $delay)

Маркер времени (UNIX timestamp) доступности.

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

int

protected DateTimeInterface|int parseDateInterval(DateTimeInterface|DateInterval|int $delay)

Если значение — интервал, преобразует его в DateTime.

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

DateTimeInterface|int

protected int currentTime()

Текущее время системы в формате UNIX timestamp.

Return Value

int

Cookie make(string $name, string $value, int $minutes, string $path = null, string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null)

Создать новый экземпляр cookie.

Parameters

string $name
string $value
int $minutes
string $path
string $domain
bool $secure
bool $httpOnly
bool $raw
string|null $sameSite

Return Value

Cookie

Cookie forever(string $name, string $value, string $path = null, string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null)

Создать cookie, действующую "вечно" (пять лет).

Parameters

string $name
string $value
string $path
string $domain
bool $secure
bool $httpOnly
bool $raw
string|null $sameSite

Return Value

Cookie

Cookie forget(string $name, string $path = null, string $domain = null)

Сбросить срок действия заданного куки.

Parameters

string $name
string $path
string $domain

Return Value

Cookie

bool hasQueued(string $key)

Определить, был ли куки помещен в очередь.

Parameters

string $key

Return Value

bool

Cookie queued(string $key, mixed $default = null)

Получить экземпляр куки из очереди.

Parameters

string $key
mixed $default

Return Value

Cookie

void queue(array $parameters)

Поместить куки в очередь для отправки с последующим ответом.

Parameters

array $parameters

Return Value

void

unqueue(string $name)

Удалить куки из очереди.

Parameters

string $name

protected array getPathAndDomain(string $path, string $domain, bool|null $secure = null, string $sameSite = null)

Получить путь и домен или значения по умолчанию.

Parameters

string $path
string $domain
bool|null $secure
string $sameSite

Return Value

array

$this setDefaultPathAndDomain(string $path, string $domain, bool $secure = false, string $sameSite = null)

Установить путь и домен по умолчанию для контейнера.

Parameters

string $path
string $domain
bool $secure
string $sameSite

Return Value

$this

array getQueuedCookies()

Получить куки, которые были помещены в очередь для следующего запроса.

Return Value

array

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.6/Illuminate/Cookie/CookieJar.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API