ILIAS  trunk Revision v5.2.0beta1-34115-g3a2438be29
ILIAS\HTTP\Cookies\CookieFactoryImpl Class Reference
+ Inheritance diagram for ILIAS\HTTP\Cookies\CookieFactoryImpl:
+ Collaboration diagram for ILIAS\HTTP\Cookies\CookieFactoryImpl:

Public Member Functions

 create (string $name, string $value=null)
 Create a new cookie with the given name and value.
Parameters
string$nameThe unique cookie name.
null | string$valueCookie value.
More...
 
 createRememberedForLongTime (string $name, string $value=null)
 Create a new cookie with the given name and value which expires in 5 years.
Parameters
string$nameThe unique cookie name.
null | string$valueCookie value.
More...
 
 createExpired (string $name)
 Creates an already expired cookie.This is useful if the cookie should be deleted at the client end.
Parameters
string$nameCookie name.
More...
 
 fromSetCookieString (string $string)
 Creates the cookie from the cookie string.
Parameters
string$stringCookie string.
More...
 

Detailed Description

Definition at line 30 of file CookieFactoryImpl.php.

Member Function Documentation

◆ create()

ILIAS\HTTP\Cookies\CookieFactoryImpl::create ( string  $name,
string  $value = null 
)

Create a new cookie with the given name and value.

Parameters
string$nameThe unique cookie name.
null | string$valueCookie value.

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 35 of file CookieFactoryImpl.php.

35  : Cookie
36  {
37  return new CookieWrapper(SetCookie::create($name, $value));
38  }

◆ createExpired()

ILIAS\HTTP\Cookies\CookieFactoryImpl::createExpired ( string  $name)

Creates an already expired cookie.This is useful if the cookie should be deleted at the client end.

Parameters
string$nameCookie name.

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 53 of file CookieFactoryImpl.php.

53  : Cookie
54  {
55  return new CookieWrapper(SetCookie::createExpired($name));
56  }

◆ createRememberedForLongTime()

ILIAS\HTTP\Cookies\CookieFactoryImpl::createRememberedForLongTime ( string  $name,
string  $value = null 
)

Create a new cookie with the given name and value which expires in 5 years.

Parameters
string$nameThe unique cookie name.
null | string$valueCookie value.

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 44 of file CookieFactoryImpl.php.

44  : Cookie
45  {
46  return new CookieWrapper(SetCookie::createRememberedForever($name, $value));
47  }

◆ fromSetCookieString()

ILIAS\HTTP\Cookies\CookieFactoryImpl::fromSetCookieString ( string  $string)

Creates the cookie from the cookie string.

Parameters
string$stringCookie string.

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 62 of file CookieFactoryImpl.php.

62  : Cookie
63  {
64  return new CookieWrapper(SetCookie::fromSetCookieString($string));
65  }

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