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

Public Member Functions

 create ($name, $value=null)
 Create a new cookie with the given name and value.
Parameters
string$nameThe unique cookie name.
null | string$valueCookie value.
Returns
Cookie
More...
 
 createRememberedForLongTime ($name, $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.
Returns
Cookie
More...
 
 createExpired ($name)
 Creates an already expired cookie.This is useful if the cookie should be deleted at the client end.
Parameters
string$nameCookie name.
Returns
Cookie
More...
 
 fromSetCookieString ($string)
 Creates the cookie from the cookie string.
Parameters
string$stringCookie string.
Returns
Cookie
More...
 

Detailed Description

Definition at line 17 of file CookieFactoryImpl.php.

Member Function Documentation

◆ create()

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

Create a new cookie with the given name and value.

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

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 23 of file CookieFactoryImpl.php.

References $name, and Dflydev\FigCookies\SetCookie\create().

24  {
25  return new CookieWrapper(SetCookie::create($name, $value));
26  }
static create($name, $value=null)
Definition: SetCookie.php:173
+ Here is the call graph for this function:

◆ createExpired()

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

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

Parameters
string$nameCookie name.
Returns
Cookie

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 41 of file CookieFactoryImpl.php.

References $name, and Dflydev\FigCookies\SetCookie\createExpired().

42  {
43  return new CookieWrapper(SetCookie::createExpired($name));
44  }
+ Here is the call graph for this function:

◆ createRememberedForLongTime()

ILIAS\HTTP\Cookies\CookieFactoryImpl::createRememberedForLongTime (   $name,
  $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.
Returns
Cookie

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 32 of file CookieFactoryImpl.php.

References $name, and Dflydev\FigCookies\SetCookie\createRememberedForever().

33  {
34  return new CookieWrapper(SetCookie::createRememberedForever($name, $value));
35  }
static createRememberedForever($name, $value=null)
Definition: SetCookie.php:178
+ Here is the call graph for this function:

◆ fromSetCookieString()

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

Creates the cookie from the cookie string.

Parameters
string$stringCookie string.
Returns
Cookie

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 50 of file CookieFactoryImpl.php.

51  {
52  return new CookieWrapper(SetCookie::fromSetCookieString($string));
53  }

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