ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 @inheritDoc More...
 
 getValue ()
 @inheritDoc More...
 
 getExpires ()
 @inheritDoc More...
 
 getMaxAge ()
 @inheritDoc More...
 
 getPath ()
 @inheritDoc More...
 
 getDomain ()
 @inheritDoc More...
 
 getSecure ()
 @inheritDoc More...
 
 getHttpOnly ()
 @inheritDoc More...
 
 withValue ($value=null)
 @inheritDoc More...
 
 withExpires ($expires=null)
 @inheritDoc More...
 
 rememberForLongTime ()
 @inheritDoc More...
 
 expire ()
 @inheritDoc More...
 
 withMaxAge ($maxAge=null)
 @inheritDoc More...
 
 withPath ($path=null)
 @inheritDoc More...
 
 withDomain ($domain=null)
 @inheritDoc More...
 
 withSecure ($secure=null)
 @inheritDoc More...
 
 withHttpOnly ($httpOnly=null)
 @inheritDoc More...
 
 __toString ()
 @inheritDoc More...
 
 getImplementation ()
 Returns the underlying implementation. More...
 
 getName ()
 Cookie name. More...
 
 getValue ()
 Cookie value. More...
 
 getExpires ()
 Expiration date as unix timestamp. More...
 
 getMaxAge ()
 Max age measured in seconds. More...
 
 getPath ()
 Cookie path. More...
 
 getDomain ()
 Cookie domain. More...
 
 getSecure ()
 True if it's secure cookie otherwise false. More...
 
 getHttpOnly ()
 True if the cookie is http only otherwise false. More...
 
 withValue ($value=null)
 Sets the cookie value. More...
 
 withExpires ($expires=null)
 Sets the expiration date of the cookie. More...
 
 rememberForLongTime ()
 Sets the expiration date to +5 years. More...
 
 expire ()
 Expire the cookie. More...
 
 withMaxAge ($maxAge=null)
 Maximal life time of the cookie in seconds. More...
 
 withPath ($path=null)
 Sets the cookie path. More...
 
 withDomain ($domain=null)
 Sets the domain name for the cookie. More...
 
 withSecure ($secure=null)
 Sets if the cookie is a secure cookie or not. More...
 
 withHttpOnly ($httpOnly=null)
 Sets if the cookie is http only. More...
 
 __toString ()
 Returns the string representation of the object. 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.

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

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

Member Function Documentation

◆ __toString()

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

@inheritDoc

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

@inheritDoc

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

@inheritDoc

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

@inheritDoc

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

@inheritDoc

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.

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

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

◆ getMaxAge()

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

@inheritDoc

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

@inheritDoc

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

@inheritDoc

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

@inheritDoc

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

@inheritDoc

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

@inheritDoc

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)

@inheritDoc

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 186 of file CookieWrapper.php.

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

References $domain.

◆ withExpires()

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

@inheritDoc

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)

@inheritDoc

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)

@inheritDoc

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)

@inheritDoc

Implements ILIAS\HTTP\Cookies\Cookie.

Definition at line 174 of file CookieWrapper.php.

175 {
176 $clone = clone $this;
177 $clone->cookie = $this->cookie->withPath($path);
178
179 return $clone;
180 }
$path
Definition: aliased.php:25

References $path.

◆ withSecure()

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

@inheritDoc

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)

@inheritDoc

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: