ILIAS
release_8 Revision v8.19
|
Public Member Functions | |
getName () | |
Cookie name. More... | |
getValue () | |
Cookie value. More... | |
getExpires () | |
Expiration date as unix timestamp. More... | |
getMaxAge () | |
Max age measured in seconds. More... | |
getPath () | |
Cookie path. More... | |
getDomain () | |
Cookie domain. More... | |
getSecure () | |
True if it's secure cookie otherwise false. More... | |
getHttpOnly () | |
True if the cookie is http only otherwise false. More... | |
getSamesite () | |
Cookie samesite. More... | |
withValue (string $value=null) | |
Sets the cookie value. More... | |
withExpires ($expires=null) | |
Sets the expiration date of the cookie. More... | |
rememberForLongTime () | |
Sets the expiration date to +5 years. More... | |
expire () | |
Expire the cookie. More... | |
withMaxAge (int $maxAge=null) | |
Maximal life time of the cookie in seconds. More... | |
withPath (string $path=null) | |
Sets the cookie path. More... | |
withDomain (string $domain=null) | |
Sets the domain name for the cookie. More... | |
withSecure (bool $secure=null) | |
Sets if the cookie is a secure cookie or not. More... | |
withHttpOnly (bool $httpOnly=null) | |
Sets if the cookie is http only. More... | |
withSamesite (string $sameSite) | |
Sets the samesite attribute. More... | |
__toString () | |
Returns the string representation of the object. More... | |
Data Fields | |
const | SAMESITE_NONE = 'None' |
const | SAMESITE_LAX = 'Lax' |
const | SAMESITE_STRICT = 'Strict' |
Definition at line 32 of file Cookie.php.
ILIAS\HTTP\Cookies\Cookie::__toString | ( | ) |
Returns the string representation of the object.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::expire | ( | ) |
Expire the cookie.
Useful if the cookie should be deleted at the client side.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
Referenced by ILIAS\HTTP\Cookies\CookieWrapper\expire().
ILIAS\HTTP\Cookies\Cookie::getDomain | ( | ) |
Cookie domain.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::getExpires | ( | ) |
Expiration date as unix timestamp.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::getHttpOnly | ( | ) |
True if the cookie is http only otherwise false.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::getMaxAge | ( | ) |
Max age measured in seconds.
If the max age is zero no max age is set.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::getName | ( | ) |
Cookie name.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::getPath | ( | ) |
Cookie path.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::getSamesite | ( | ) |
Cookie samesite.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::getSecure | ( | ) |
True if it's secure cookie otherwise false.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::getValue | ( | ) |
Cookie value.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::rememberForLongTime | ( | ) |
Sets the expiration date to +5 years.
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::withDomain | ( | string | $domain = null | ) |
Sets the domain name for the cookie.
null | string | $domain | Cookie domain. |
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
Referenced by ILIAS\HTTP\Cookies\CookieWrapper\withDomain().
ILIAS\HTTP\Cookies\Cookie::withExpires | ( | $expires = null | ) |
Sets the expiration date of the cookie.
If the cookie should be expired please use the expire function.
If the expires parameter equals null, then the expires key will be removed from the cookie.
null | \DateTimeInterface | int | string | $expires | The expiration time of the Cookie. |
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
Referenced by ILIAS\HTTP\Cookies\CookieWrapper\withExpires().
ILIAS\HTTP\Cookies\Cookie::withHttpOnly | ( | bool | $httpOnly = null | ) |
Sets if the cookie is http only.
null | bool | $httpOnly | http only flag. |
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
Referenced by ILIAS\HTTP\Cookies\CookieWrapper\withHttpOnly().
ILIAS\HTTP\Cookies\Cookie::withMaxAge | ( | int | $maxAge = null | ) |
Maximal life time of the cookie in seconds.
The most browser prefer max age over expiration date.
null | int | $maxAge | Lifetime in seconds. |
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
Referenced by ILIAS\HTTP\Cookies\CookieWrapper\withMaxAge().
ILIAS\HTTP\Cookies\Cookie::withPath | ( | string | $path = null | ) |
Sets the cookie path.
null | string | $path | The cookie path. |
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
Referenced by ILIAS\HTTP\Cookies\CookieWrapper\withPath().
ILIAS\HTTP\Cookies\Cookie::withSamesite | ( | string | $sameSite | ) |
Sets the samesite attribute.
string | $sameSite | value of the samesite attribute. Valid values are SAMESITE_LAX, SAMESITE_STRICT or SAMESITE_NONE |
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
ILIAS\HTTP\Cookies\Cookie::withSecure | ( | bool | $secure = null | ) |
Sets if the cookie is a secure cookie or not.
null | bool | $secure | Secure flag. |
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
Referenced by ILIAS\HTTP\Cookies\CookieWrapper\withSecure().
ILIAS\HTTP\Cookies\Cookie::withValue | ( | string | $value = null | ) |
Sets the cookie value.
null | string | $value | The cookie value. |
Implemented in ILIAS\HTTP\Cookies\CookieWrapper.
Referenced by ILIAS\HTTP\Cookies\CookieWrapper\withValue().
const ILIAS\HTTP\Cookies\Cookie::SAMESITE_LAX = 'Lax' |
Definition at line 35 of file Cookie.php.
const ILIAS\HTTP\Cookies\Cookie::SAMESITE_NONE = 'None' |
Definition at line 34 of file Cookie.php.
const ILIAS\HTTP\Cookies\Cookie::SAMESITE_STRICT = 'Strict' |
Definition at line 36 of file Cookie.php.