|
| __construct (array $data=[]) |
|
| __toString () |
|
| getDiscard () |
| Get whether or not this is a session cookie.
|
|
| getDomain () |
| Get the domain.
|
|
| getExpires () |
| The UNIX timestamp when the cookie Expires.
|
|
| getHttpOnly () |
| Get whether or not this is an HTTP only cookie.
|
|
| getMaxAge () |
| Maximum lifetime of the cookie in seconds.
|
|
| getName () |
| Get the cookie name.
|
|
| getPath () |
| Get the path.
|
|
| getSecure () |
| Get whether or not this is a secure cookie.
|
|
| getValue () |
| Get the cookie value.
|
|
| isExpired () |
| Check if the cookie is expired.
|
|
| matchesDomain (string $domain) |
| Check if the cookie matches a domain value.
|
|
| matchesPath (string $requestPath) |
| Check if the cookie matches a path value.
|
|
| setDiscard ($discard) |
| Set whether or not this is a session cookie.
|
|
| setDomain ($domain) |
| Set the domain of the cookie.
|
|
| setExpires ($timestamp) |
| Set the unix timestamp for which the cookie will expire.
|
|
| setHttpOnly ($httpOnly) |
| Set whether or not this is an HTTP only cookie.
|
|
| setMaxAge ($maxAge) |
| Set the max-age of the cookie.
|
|
| setName ($name) |
| Set the cookie name.
|
|
| setPath ($path) |
| Set the path of the cookie.
|
|
| setSecure ($secure) |
| Set whether or not the cookie is secure.
|
|
| setValue ($value) |
| Set the cookie value.
|
|
| toArray () |
|
| validate () |
| Check if the cookie is valid according to RFC 6265.
|
|
|
static | fromString (string $cookie) |
| Create a new SetCookie object from a string.
|
|
◆ __construct()
GuzzleHttp\Cookie\SetCookie::__construct |
( |
array | $data = [] | ) |
|
- Parameters
-
array | $data | Array of cookie data provided by a Cookie parser |
◆ fromString()
static GuzzleHttp\Cookie\SetCookie::fromString |
( |
string | $cookie | ) |
|
|
static |
Create a new SetCookie object from a string.
- Parameters
-
string | $cookie | Set-Cookie header string |
◆ getDiscard()
GuzzleHttp\Cookie\SetCookie::getDiscard |
( |
| ) |
|
Get whether or not this is a session cookie.
- Return values
-
◆ getDomain()
GuzzleHttp\Cookie\SetCookie::getDomain |
( |
| ) |
|
Get the domain.
- Return values
-
◆ getExpires()
GuzzleHttp\Cookie\SetCookie::getExpires |
( |
| ) |
|
The UNIX timestamp when the cookie Expires.
- Return values
-
◆ getHttpOnly()
GuzzleHttp\Cookie\SetCookie::getHttpOnly |
( |
| ) |
|
Get whether or not this is an HTTP only cookie.
- Return values
-
◆ getMaxAge()
GuzzleHttp\Cookie\SetCookie::getMaxAge |
( |
| ) |
|
Maximum lifetime of the cookie in seconds.
- Return values
-
◆ getName()
GuzzleHttp\Cookie\SetCookie::getName |
( |
| ) |
|
Get the cookie name.
- Return values
-
◆ getPath()
GuzzleHttp\Cookie\SetCookie::getPath |
( |
| ) |
|
Get the path.
- Return values
-
◆ getSecure()
GuzzleHttp\Cookie\SetCookie::getSecure |
( |
| ) |
|
Get whether or not this is a secure cookie.
- Return values
-
◆ getValue()
GuzzleHttp\Cookie\SetCookie::getValue |
( |
| ) |
|
Get the cookie value.
- Return values
-
◆ matchesDomain()
GuzzleHttp\Cookie\SetCookie::matchesDomain |
( |
string | $domain | ) |
|
Check if the cookie matches a domain value.
- Parameters
-
string | $domain | Domain to check against |
◆ matchesPath()
GuzzleHttp\Cookie\SetCookie::matchesPath |
( |
string | $requestPath | ) |
|
Check if the cookie matches a path value.
A request-path path-matches a given cookie-path if at least one of the following conditions holds:
- The cookie-path and the request-path are identical.
- The cookie-path is a prefix of the request-path, and the last character of the cookie-path is x2F ("/").
- The cookie-path is a prefix of the request-path, and the first character of the request-path that is not included in the cookie- path is a x2F ("/") character.
- Parameters
-
string | $requestPath | Path to check against |
◆ setDiscard()
GuzzleHttp\Cookie\SetCookie::setDiscard |
( |
| $discard | ) |
|
Set whether or not this is a session cookie.
- Parameters
-
bool | $discard | Set to true or false if this is a session cookie |
◆ setDomain()
GuzzleHttp\Cookie\SetCookie::setDomain |
( |
| $domain | ) |
|
Set the domain of the cookie.
- Parameters
-
◆ setExpires()
GuzzleHttp\Cookie\SetCookie::setExpires |
( |
| $timestamp | ) |
|
Set the unix timestamp for which the cookie will expire.
- Parameters
-
int | string | null | $timestamp | Unix timestamp or any English textual datetime description. |
◆ setHttpOnly()
GuzzleHttp\Cookie\SetCookie::setHttpOnly |
( |
| $httpOnly | ) |
|
Set whether or not this is an HTTP only cookie.
- Parameters
-
bool | $httpOnly | Set to true or false if this is HTTP only |
◆ setMaxAge()
GuzzleHttp\Cookie\SetCookie::setMaxAge |
( |
| $maxAge | ) |
|
Set the max-age of the cookie.
- Parameters
-
int | null | $maxAge | Max age of the cookie in seconds |
◆ setName()
GuzzleHttp\Cookie\SetCookie::setName |
( |
| $name | ) |
|
Set the cookie name.
- Parameters
-
◆ setPath()
GuzzleHttp\Cookie\SetCookie::setPath |
( |
| $path | ) |
|
Set the path of the cookie.
- Parameters
-
string | $path | Path of the cookie |
◆ setSecure()
GuzzleHttp\Cookie\SetCookie::setSecure |
( |
| $secure | ) |
|
Set whether or not the cookie is secure.
- Parameters
-
bool | $secure | Set to true or false if secure |
◆ setValue()
GuzzleHttp\Cookie\SetCookie::setValue |
( |
| $value | ) |
|
Set the cookie value.
- Parameters
-
◆ validate()
GuzzleHttp\Cookie\SetCookie::validate |
( |
| ) |
|
Check if the cookie is valid according to RFC 6265.
- Return values
-
bool|string | Returns true if valid or an error message if invalid |
The documentation for this class was generated from the following file:
- lib/guzzlehttp/guzzle/src/Cookie/SetCookie.php