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.
protected int availableAt(DateTimeInterface|DateInterval|int $delay)
Маркер времени (UNIX timestamp) доступности.
protected DateTimeInterface|int parseDateInterval(DateTimeInterface|DateInterval|int $delay)
Если значение — интервал, преобразует его в DateTime.
protected int currentTime()
Текущее время системы в формате UNIX timestamp.
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)
Сбросить срок действия заданного куки.
bool hasQueued(string $key)
Определить, был ли куки помещен в очередь.
Cookie queued(string $key, mixed $default = null)
Получить экземпляр куки из очереди.
void queue(array $parameters)
Поместить куки в очередь для отправки с последующим ответом.
unqueue(string $name)
Удалить куки из очереди.
protected 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()
Получить куки, которые были помещены в очередь для следующего запроса.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.6/Illuminate/Cookie/CookieJar.html