ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\HTTP\Cookies\CookieWrapper Class Reference
+ Inheritance diagram for ILIAS\HTTP\Cookies\CookieWrapper:
+ Collaboration diagram for ILIAS\HTTP\Cookies\CookieWrapper:

Public Member Functions

 __construct (SetCookie $cookie)
 CookieFacade constructor. More...
 
 getName ()
 
 getValue ()
 
 getExpires ()
 
 getMaxAge ()
 
 getPath ()
 
 getDomain ()
 
 getSecure ()
 
 getHttpOnly ()
 
 withValue (string $value=null)
 
 withExpires ($expires=null)
 
 rememberForLongTime ()
 
 expire ()
 
 withMaxAge (int $maxAge=null)
 
 withPath (string $path=null)
 
 withDomain (string $domain=null)
 
 withSecure (bool $secure=null)
 
 withHttpOnly (bool $httpOnly=null)
 
 __toString ()
 
 getImplementation ()
 Returns the underlying implementation. More...
 

Private Attributes

 $cookie
 Underlying implementation. More...
 

Detailed Description

Definition at line 17 of file CookieWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\HTTP\Cookies\CookieWrapper::__construct ( SetCookie  $cookie)

CookieFacade constructor.

Parameters
SetCookie$cookie

Definition at line 33 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\CookieWrapper\$cookie.

34  {
35  $this->cookie = $cookie;
36  }
$cookie
Underlying implementation.

Member Function Documentation

◆ __toString()

ILIAS\HTTP\Cookies\CookieWrapper::__toString ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 222 of file CookieWrapper.php.

222  : string
223  {
224  return $this->cookie->__toString();
225  }

◆ expire()

ILIAS\HTTP\Cookies\CookieWrapper::expire ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 150 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\Cookie\expire().

151  {
152  $clone = clone $this;
153  $clone->cookie = $this->cookie->expire();
154 
155  return $clone;
156  }
expire()
Expire the cookie.
+ Here is the call graph for this function:

◆ getDomain()

ILIAS\HTTP\Cookies\CookieWrapper::getDomain ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 87 of file CookieWrapper.php.

87  : ?string
88  {
89  return $this->cookie->getDomain();
90  }

◆ getExpires()

ILIAS\HTTP\Cookies\CookieWrapper::getExpires ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 60 of file CookieWrapper.php.

60  : int
61  {
62  return $this->cookie->getExpires();
63  }

◆ getHttpOnly()

ILIAS\HTTP\Cookies\CookieWrapper::getHttpOnly ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 105 of file CookieWrapper.php.

105  : bool
106  {
107  return $this->cookie->getHttpOnly();
108  }

◆ getImplementation()

ILIAS\HTTP\Cookies\CookieWrapper::getImplementation ( )

Returns the underlying implementation.

Only for package/service internal use!!!

Returns
SetCookie

Definition at line 235 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\CookieWrapper\$cookie.

236  {
237  return $this->cookie;
238  }
$cookie
Underlying implementation.

◆ getMaxAge()

ILIAS\HTTP\Cookies\CookieWrapper::getMaxAge ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 69 of file CookieWrapper.php.

69  : int
70  {
71  return $this->cookie->getMaxAge();
72  }

◆ getName()

ILIAS\HTTP\Cookies\CookieWrapper::getName ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 42 of file CookieWrapper.php.

42  : string
43  {
44  return $this->cookie->getName();
45  }

◆ getPath()

ILIAS\HTTP\Cookies\CookieWrapper::getPath ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 78 of file CookieWrapper.php.

78  : ?string
79  {
80  return $this->cookie->getPath();
81  }

◆ getSecure()

ILIAS\HTTP\Cookies\CookieWrapper::getSecure ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 96 of file CookieWrapper.php.

96  : bool
97  {
98  return $this->cookie->getSecure();
99  }

◆ getValue()

ILIAS\HTTP\Cookies\CookieWrapper::getValue ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 51 of file CookieWrapper.php.

51  : ?string
52  {
53  return $this->cookie->getValue();
54  }

◆ rememberForLongTime()

ILIAS\HTTP\Cookies\CookieWrapper::rememberForLongTime ( )

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 138 of file CookieWrapper.php.

139  {
140  $clone = clone $this;
141  $clone->cookie = $this->cookie->rememberForever();
142 
143  return $clone;
144  }

◆ withDomain()

ILIAS\HTTP\Cookies\CookieWrapper::withDomain ( string  $domain = null)

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 186 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\Cookie\withDomain().

187  {
188  $clone = clone $this;
189  $clone->cookie = $this->cookie->withDomain($domain);
190 
191  return $clone;
192  }
withDomain(string $domain=null)
Sets the domain name for the cookie.
+ Here is the call graph for this function:

◆ withExpires()

ILIAS\HTTP\Cookies\CookieWrapper::withExpires (   $expires = null)

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 126 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\Cookie\withExpires().

127  {
128  $clone = clone $this;
129  $clone->cookie = $this->cookie->withExpires($expires);
130 
131  return $clone;
132  }
withExpires($expires=null)
Sets the expiration date of the cookie.
+ Here is the call graph for this function:

◆ withHttpOnly()

ILIAS\HTTP\Cookies\CookieWrapper::withHttpOnly ( bool  $httpOnly = null)

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 210 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\Cookie\withHttpOnly().

211  {
212  $clone = clone $this;
213  $clone->cookie = $this->cookie->withHttpOnly($httpOnly);
214 
215  return $clone;
216  }
withHttpOnly(bool $httpOnly=null)
Sets if the cookie is http only.
+ Here is the call graph for this function:

◆ withMaxAge()

ILIAS\HTTP\Cookies\CookieWrapper::withMaxAge ( int  $maxAge = null)

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 162 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\Cookie\withMaxAge().

163  {
164  $clone = clone $this;
165  $clone->cookie = $this->cookie->withMaxAge($maxAge);
166 
167  return $clone;
168  }
withMaxAge(int $maxAge=null)
Maximal life time of the cookie in seconds.
+ Here is the call graph for this function:

◆ withPath()

ILIAS\HTTP\Cookies\CookieWrapper::withPath ( string  $path = null)

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 174 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\Cookie\withPath().

175  {
176  $clone = clone $this;
177  $clone->cookie = $this->cookie->withPath($path);
178 
179  return $clone;
180  }
withPath(string $path=null)
Sets the cookie path.
+ Here is the call graph for this function:

◆ withSecure()

ILIAS\HTTP\Cookies\CookieWrapper::withSecure ( bool  $secure = null)

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 198 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\Cookie\withSecure().

199  {
200  $clone = clone $this;
201  $clone->cookie = $this->cookie->withSecure($secure);
202 
203  return $clone;
204  }
withSecure(bool $secure=null)
Sets if the cookie is a secure cookie or not.
+ Here is the call graph for this function:

◆ withValue()

ILIAS\HTTP\Cookies\CookieWrapper::withValue ( string  $value = null)

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 114 of file CookieWrapper.php.

References ILIAS\HTTP\Cookies\Cookie\withValue().

115  {
116  $clone = clone $this;
117  $clone->cookie = $this->cookie->withValue($value);
118 
119  return $clone;
120  }
withValue(string $value=null)
Sets the cookie value.
+ Here is the call graph for this function:

Field Documentation

◆ $cookie

SetCookie ILIAS\HTTP\Cookies\CookieWrapper::$cookie
private

Underlying implementation.

Definition at line 25 of file CookieWrapper.php.

Referenced by ILIAS\HTTP\Cookies\CookieWrapper\__construct(), and ILIAS\HTTP\Cookies\CookieWrapper\getImplementation().


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