ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 @inheritDoc More...
 
 get (string $name)
 @inheritDoc More...
 
 getAll ()
 @inheritDoc More...
 
 without (string $name)
 @inheritDoc More...
 
 renderIntoResponseHeader (ResponseInterface $response)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\HTTP\Cookies\CookieJar
 has (string $name)
 Checks if a cookie with the given name is in the jar. More...
 
 get (string $name)
 Fetches the cookie with the given name from the current jar. More...
 
 getAll ()
 Fetches all cookies from the current jar. More...
 
 with (Cookie $setCookie)
 Creates a new cookie jar with the given cookie. More...
 
 without (string $name)
 Creates a cookie jar without the specified cookie. More...
 
 renderIntoResponseHeader (ResponseInterface $response)
 Render CookieJar into a Response. 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)

@inheritDoc

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 56 of file CookieJarWrapper.php.

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

◆ getAll()

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

@inheritDoc

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 67 of file CookieJarWrapper.php.

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

◆ has()

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

@inheritDoc

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)

@inheritDoc

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

References $response.

◆ without()

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

@inheritDoc

Implements ILIAS\HTTP\Cookies\CookieJar.

Definition at line 99 of file CookieJarWrapper.php.

99 : CookieJar
100 {
101 $clone = clone $this;
102 $clone->cookies = $this->cookies->without($name);
103
104 return $clone;
105 }

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

+ Here is the call graph for this function:

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