ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\HTTP\Cookies\CookieJarWrapper Class Reference
+ Inheritance diagram for ILIAS\HTTP\Cookies\CookieJarWrapper:
+ Collaboration diagram for ILIAS\HTTP\Cookies\CookieJarWrapper:

Public Member Functions

 __construct (private SetCookies $cookies)
 CookieJarWrapper constructor. More...
 
 has (string $name)
 
 get (string $name)
 
 getAll ()
 
 without (string $name)
 
 renderIntoResponseHeader (ResponseInterface $response)
 
- Public Member Functions inherited from ILIAS\HTTP\Cookies\CookieJar
 with (Cookie $setCookie)
 Creates a new cookie jar with the given cookie. More...
 

Detailed Description

Definition at line 34 of file CookieJarWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\HTTP\Cookies\CookieJarWrapper::__construct ( private SetCookies  $cookies)

CookieJarWrapper constructor.

Definition at line 39 of file CookieJarWrapper.php.

40  {
41  }

Member Function Documentation

◆ get()

ILIAS\HTTP\Cookies\CookieJarWrapper::get ( string  $name)

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 56 of file CookieJarWrapper.php.

References null.

56  : ?Cookie
57  {
58  $cookie = $this->cookies->get($name);
59 
60  return (is_null($cookie)) ? null : new CookieWrapper($cookie);
61  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getAll()

ILIAS\HTTP\Cookies\CookieJarWrapper::getAll ( )

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 67 of file CookieJarWrapper.php.

References ILIAS\HTTP\Cookies\CookieJar\with().

67  : array
68  {
69  $wrappedCookies = [];
70  foreach ($this->cookies->getAll() as $cookie) {
71  $wrappedCookies[] = new CookieWrapper($cookie);
72  }
73 
74  return $wrappedCookies;
75  }
+ Here is the call graph for this function:

◆ has()

ILIAS\HTTP\Cookies\CookieJarWrapper::has ( string  $name)

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 47 of file CookieJarWrapper.php.

47  : bool
48  {
49  return $this->cookies->has($name);
50  }

◆ renderIntoResponseHeader()

ILIAS\HTTP\Cookies\CookieJarWrapper::renderIntoResponseHeader ( ResponseInterface  $response)

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 111 of file CookieJarWrapper.php.

111  : ResponseInterface
112  {
113  return $this->cookies->renderIntoSetCookieHeader($response);
114  }
$response
Definition: xapitoken.php:93

◆ without()

ILIAS\HTTP\Cookies\CookieJarWrapper::without ( string  $name)

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 99 of file CookieJarWrapper.php.

References ILIAS\HTTP\Cookies\CookieJar\without().

99  : CookieJar
100  {
101  $clone = clone $this;
102  $clone->cookies = $this->cookies->without($name);
103 
104  return $clone;
105  }
+ Here is the call graph for this function:

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