ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ILIAS\HTTP\Cookies\Cookie Interface Reference
+ Inheritance diagram for ILIAS\HTTP\Cookies\Cookie:
+ Collaboration diagram for ILIAS\HTTP\Cookies\Cookie:

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...
 
 withValue ($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 ($maxAge=null)
 Maximal life time of the cookie in seconds. More...
 
 withPath ($path=null)
 Sets the cookie path. More...
 
 withDomain ($domain=null)
 Sets the domain name for the cookie. More...
 
 withSecure ($secure=null)
 Sets if the cookie is a secure cookie or not. More...
 
 withHttpOnly ($httpOnly=null)
 Sets if the cookie is http only. More...
 
 __toString ()
 Returns the string representation of the object. More...
 

Detailed Description

Definition at line 16 of file Cookie.php.

Member Function Documentation

◆ __toString()

ILIAS\HTTP\Cookies\Cookie::__toString ( )

Returns the string representation of the object.

Returns
string String representation.

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ expire()

ILIAS\HTTP\Cookies\Cookie::expire ( )

Expire the cookie.

Useful if the cookie should be deleted at the client side.

Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ getDomain()

ILIAS\HTTP\Cookies\Cookie::getDomain ( )

Cookie domain.

Returns
string

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ getExpires()

ILIAS\HTTP\Cookies\Cookie::getExpires ( )

Expiration date as unix timestamp.

Returns
int

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ getHttpOnly()

ILIAS\HTTP\Cookies\Cookie::getHttpOnly ( )

True if the cookie is http only otherwise false.

Returns
bool

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ getMaxAge()

ILIAS\HTTP\Cookies\Cookie::getMaxAge ( )

Max age measured in seconds.

If the max age is zero no max age is set.

Returns
int

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ getName()

ILIAS\HTTP\Cookies\Cookie::getName ( )

Cookie name.

Returns
string

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

Referenced by ilWACTokenTest\testCookieGeneration().

+ Here is the caller graph for this function:

◆ getPath()

ILIAS\HTTP\Cookies\Cookie::getPath ( )

Cookie path.

Returns
string

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ getSecure()

ILIAS\HTTP\Cookies\Cookie::getSecure ( )

True if it's secure cookie otherwise false.

Returns
bool

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ getValue()

ILIAS\HTTP\Cookies\Cookie::getValue ( )

Cookie value.

Returns
string|null

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ rememberForLongTime()

ILIAS\HTTP\Cookies\Cookie::rememberForLongTime ( )

Sets the expiration date to +5 years.

Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ withDomain()

ILIAS\HTTP\Cookies\Cookie::withDomain (   $domain = null)

Sets the domain name for the cookie.

Parameters
null | string$domainCookie domain.
Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ withExpires()

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.

Parameters
null | \DateTimeInterface | int | string$expiresThe expiration time of the Cookie.
Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ withHttpOnly()

ILIAS\HTTP\Cookies\Cookie::withHttpOnly (   $httpOnly = null)

Sets if the cookie is http only.

Parameters
null | bool$httpOnlyhttp only flag.
Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ withMaxAge()

ILIAS\HTTP\Cookies\Cookie::withMaxAge (   $maxAge = null)

Maximal life time of the cookie in seconds.

The most browser prefer max age over expiration date.

Parameters
null | int$maxAgeLifetime in seconds.
Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ withPath()

ILIAS\HTTP\Cookies\Cookie::withPath (   $path = null)

Sets the cookie path.

Parameters
null | string$pathThe cookie path.
Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ withSecure()

ILIAS\HTTP\Cookies\Cookie::withSecure (   $secure = null)

Sets if the cookie is a secure cookie or not.

Parameters
null | bool$secureSecure flag.
Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.

◆ withValue()

ILIAS\HTTP\Cookies\Cookie::withValue (   $value = null)

Sets the cookie value.

Parameters
null | string$valueThe cookie value.
Returns
Cookie

Implemented in ILIAS\HTTP\Cookies\CookieWrapper.


The documentation for this interface was generated from the following file: