Amp\Http\Cookie\CookieAttributes class CookieAttributes

Cookie attributes as defined in https://tools.ietf.org/html/rfc6265.

Summary

Properties

Methods

Properties

Methods

empty — public function empty(): Amp\Http\Cookie\CookieAttributes
No documentation.
default — public function default(): Amp\Http\Cookie\CookieAttributes
No documentation.
withPath — public function withPath(string $path): self
No documentation.
Type Parameter Description Default Value
string $path Cookie path. none
withDomain — public function withDomain(string $domain): self
No documentation.
Type Parameter Description Default Value
string $domain Cookie domain. none
withMaxAge — public function withMaxAge(int $maxAge): self

Applies the given maximum age to the cookie.

Type Parameter Description Default Value
int $maxAge Cookie maximum age. none
withoutMaxAge — public function withoutMaxAge(): self

Removes any max-age information.

withExpiry — public function withExpiry(DateTimeInterface $date): self

Applies the given expiry to the cookie.

Type Parameter Description Default Value
DateTimeInterface $date No documentation. none
withoutExpiry — public function withoutExpiry(): self

Removes any expiry information.

withSecure — public function withSecure(): self
No documentation.
withoutSecure — public function withoutSecure(): self
No documentation.
withHttpOnly — public function withHttpOnly(): self
No documentation.
withoutHttpOnly — public function withoutHttpOnly(): self
No documentation.
getPath — public function getPath(): string
No documentation.
getDomain — public function getDomain(): string
No documentation.
getMaxAge — public function getMaxAge(): int|null
No documentation.
getExpiry — public function getExpiry(): DateTimeImmutable|null
No documentation.
isSecure — public function isSecure(): bool
No documentation.
isHttpOnly — public function isHttpOnly(): bool
No documentation.
__toString — public function __toString(): string
No documentation.