ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ILIAS\HTTP\Cookies\CookieJarWrapper Class Reference
+ Inheritance diagram for ILIAS\HTTP\Cookies\CookieJarWrapper:
+ Collaboration diagram for ILIAS\HTTP\Cookies\CookieJarWrapper:

Public Member Functions

 __construct (SetCookies $cookies)
 CookieJarWrapper constructor. More...
 
 has ($name)
 
 get ($name)
 
 getAll ()
 
 without ($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...
 

Private Attributes

 $cookies
 

Detailed Description

Definition at line 18 of file CookieJarWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

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

CookieJarWrapper constructor.

Parameters
SetCookies$cookies

Definition at line 32 of file CookieJarWrapper.php.

References ILIAS\HTTP\Cookies\CookieJarWrapper\$cookies.

33  {
34  $this->cookies = $cookies;
35  }

Member Function Documentation

◆ get()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 50 of file CookieJarWrapper.php.

References $name.

51  {
52  $cookie = $this->cookies->get($name);
53 
54  return (is_null($cookie)) ? null : new CookieWrapper($cookie);
55  }
if($format !==null) $name
Definition: metadata.php:146

◆ getAll()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 61 of file CookieJarWrapper.php.

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

62  {
63  $wrappedCookies = [];
64  foreach ($this->cookies->getAll() as $cookie) {
65  $wrappedCookies[] = new CookieWrapper($cookie);
66  }
67 
68  return $wrappedCookies;
69  }
+ Here is the call graph for this function:

◆ has()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 41 of file CookieJarWrapper.php.

References $name.

42  {
43  return $this->cookies->has($name);
44  }
if($format !==null) $name
Definition: metadata.php:146

◆ renderIntoResponseHeader()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 105 of file CookieJarWrapper.php.

References $response.

106  {
107  $response = $this->cookies->renderIntoSetCookieHeader($response);
108 
109  return $response;
110  }
$response

◆ without()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 93 of file CookieJarWrapper.php.

References $name.

94  {
95  $clone = clone $this;
96  $clone->cookies = $this->cookies->without($name);
97 
98  return $clone;
99  }
if($format !==null) $name
Definition: metadata.php:146

Field Documentation

◆ $cookies

SetCookies ILIAS\HTTP\Cookies\CookieJarWrapper::$cookies
private

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