ILIAS  release_8 Revision v8.23
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

SetCookies $cookies
 

Detailed Description

Definition at line 31 of file CookieJarWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

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

CookieJarWrapper constructor.

Definition at line 39 of file CookieJarWrapper.php.

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

40  {
41  $this->cookies = $cookies;
42  }

Member Function Documentation

◆ get()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 57 of file CookieJarWrapper.php.

References $name.

58  {
59  $cookie = $this->cookies->get($name);
60 
61  return (is_null($cookie)) ? null : new CookieWrapper($cookie);
62  }
if($format !==null) $name
Definition: metadata.php:247

◆ getAll()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 68 of file CookieJarWrapper.php.

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

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

◆ has()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 48 of file CookieJarWrapper.php.

48  : bool
49  {
50  return $this->cookies->has($name);
51  }
if($format !==null) $name
Definition: metadata.php:247

◆ renderIntoResponseHeader()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 112 of file CookieJarWrapper.php.

112  : ResponseInterface
113  {
114  return $this->cookies->renderIntoSetCookieHeader($response);
115  }
$response

◆ without()

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

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 100 of file CookieJarWrapper.php.

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

100  : CookieJar
101  {
102  $clone = clone $this;
103  $clone->cookies = $this->cookies->without($name);
104 
105  return $clone;
106  }
if($format !==null) $name
Definition: metadata.php:247
+ 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: