ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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.
Returns
Cookie
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.
Returns
Cookie
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.
Returns
Cookie
More...
 
 fromSetCookieString (string $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 ( 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.
Returns
Cookie

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 23 of file CookieFactoryImpl.php.

24  {
25  return new CookieWrapper(SetCookie::create($name, $value));
26  }
if($format !==null) $name
Definition: metadata.php:230

◆ 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.
Returns
Cookie

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 41 of file CookieFactoryImpl.php.

42  {
43  return new CookieWrapper(SetCookie::createExpired($name));
44  }
if($format !==null) $name
Definition: metadata.php:230

◆ 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.
Returns
Cookie

Implements ILIAS\HTTP\Cookies\CookieFactory.

Definition at line 32 of file CookieFactoryImpl.php.

33  {
34  return new CookieWrapper(SetCookie::createRememberedForever($name, $value));
35  }
if($format !==null) $name
Definition: metadata.php:230

◆ fromSetCookieString()

ILIAS\HTTP\Cookies\CookieFactoryImpl::fromSetCookieString ( string  $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: