ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
CookieFactoryImpl.php
Go to the documentation of this file.
1 <?php
2 
3 namespace ILIAS\HTTP\Cookies;
4 
6 
18 {
19 
23  public function create(string $name, string $value = null) : \ILIAS\HTTP\Cookies\Cookie
24  {
25  return new CookieWrapper(SetCookie::create($name, $value));
26  }
27 
28 
32  public function createRememberedForLongTime(string $name, string $value = null) : \ILIAS\HTTP\Cookies\Cookie
33  {
34  return new CookieWrapper(SetCookie::createRememberedForever($name, $value));
35  }
36 
37 
41  public function createExpired(string $name) : \ILIAS\HTTP\Cookies\Cookie
42  {
43  return new CookieWrapper(SetCookie::createExpired($name));
44  }
45 
46 
50  public function fromSetCookieString(string $string) : \ILIAS\HTTP\Cookies\Cookie
51  {
52  return new CookieWrapper(SetCookie::fromSetCookieString($string));
53  }
54 }
Class ChatMainBarProvider .
create(string $name, string $value=null)
Create a new cookie with the given name and value.The unique cookie name. Cookie value.Cookie
fromSetCookieString(string $string)
Creates the cookie from the cookie string.Cookie string.Cookie
Class CookieJarWrapperTest.
Definition: Cookie.php:3
if($format !==null) $name
Definition: metadata.php:230
createRememberedForLongTime(string $name, string $value=null)
Create a new cookie with the given name and value which expires in 5 years.The unique cookie name...
createExpired(string $name)
Creates an already expired cookie.This is useful if the cookie should be deleted at the client end...