ILIAS  release_7 Revision v7.30-3-g800a261c036
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 (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...
 

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 ( string  $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:230

◆ 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().

61  : array
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 ( string  $name)

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 41 of file CookieJarWrapper.php.

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

◆ renderIntoResponseHeader()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 105 of file CookieJarWrapper.php.

References $response.

105  : \Psr\Http\Message\ResponseInterface
106  {
107  $response = $this->cookies->renderIntoSetCookieHeader($response);
108 
109  return $response;
110  }
$response

◆ without()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 93 of file CookieJarWrapper.php.

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

94  {
95  $clone = clone $this;
96  $clone->cookies = $this->cookies->without($name);
97 
98  return $clone;
99  }
if($format !==null) $name
Definition: metadata.php:230
without(string $name)
Creates a cookie jar without the specified cookie.
+ Here is the call graph for this function:

Field Documentation

◆ $cookies

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

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