ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ($value=null)
 
 withExpires ($expires=null)
 
 rememberForLongTime ()
 
 expire ()
 
 withMaxAge ($maxAge=null)
 
 withPath ($path=null)
 
 withDomain ($domain=null)
 
 withSecure ($secure=null)
 
 withHttpOnly ($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.

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.

151  {
152  $clone = clone $this;
153  $clone->cookie = $this->cookie->expire();
154 
155  return $clone;
156  }

◆ getDomain()

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

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 87 of file CookieWrapper.php.

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.

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.

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

◆ getImplementation()

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

Returns the underlying implementation.

Only for package/service internal use!!!

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.

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.

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.

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.

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.

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 (   $domain = null)

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 186 of file CookieWrapper.php.

References $domain.

187  {
188  $clone = clone $this;
189  $clone->cookie = $this->cookie->withDomain($domain);
190 
191  return $clone;
192  }
if(!array_key_exists('domain', $_REQUEST)) $domain
Definition: resume.php:8

◆ withExpires()

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

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 126 of file CookieWrapper.php.

127  {
128  $clone = clone $this;
129  $clone->cookie = $this->cookie->withExpires($expires);
130 
131  return $clone;
132  }

◆ withHttpOnly()

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

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 210 of file CookieWrapper.php.

211  {
212  $clone = clone $this;
213  $clone->cookie = $this->cookie->withHttpOnly($httpOnly);
214 
215  return $clone;
216  }

◆ withMaxAge()

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

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 162 of file CookieWrapper.php.

163  {
164  $clone = clone $this;
165  $clone->cookie = $this->cookie->withMaxAge($maxAge);
166 
167  return $clone;
168  }

◆ withPath()

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

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 174 of file CookieWrapper.php.

References $path.

175  {
176  $clone = clone $this;
177  $clone->cookie = $this->cookie->withPath($path);
178 
179  return $clone;
180  }

◆ withSecure()

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

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 198 of file CookieWrapper.php.

199  {
200  $clone = clone $this;
201  $clone->cookie = $this->cookie->withSecure($secure);
202 
203  return $clone;
204  }

◆ withValue()

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

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 114 of file CookieWrapper.php.

115  {
116  $clone = clone $this;
117  $clone->cookie = $this->cookie->withValue($value);
118 
119  return $clone;
120  }

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: