ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
Cookie.php
Go to the documentation of this file.
1 <?php
2 
4 
16 interface Cookie
17 {
18 
24  public function getName() : string;
25 
26 
32  public function getValue() : ?string;
33 
34 
40  public function getExpires() : int;
41 
42 
49  public function getMaxAge() : int;
50 
51 
57  public function getPath() : ?string;
58 
59 
65  public function getDomain() : ?string;
66 
67 
73  public function getSecure() : bool;
74 
75 
81  public function getHttpOnly() : bool;
82 
83 
91  public function withValue(string $value = null) : Cookie;
92 
93 
105  public function withExpires($expires = null) : Cookie;
106 
107 
113  public function rememberForLongTime() : Cookie;
114 
115 
122  public function expire() : Cookie;
123 
124 
133  public function withMaxAge(int $maxAge = null) : Cookie;
134 
135 
143  public function withPath(string $path = null) : Cookie;
144 
145 
153  public function withDomain(string $domain = null) : Cookie;
154 
155 
163  public function withSecure(bool $secure = null) : Cookie;
164 
165 
173  public function withHttpOnly(bool $httpOnly = null) : Cookie;
174 
175 
181  public function __toString() : string;
182 }
__toString()
Returns the string representation of the object.
withMaxAge(int $maxAge=null)
Maximal life time of the cookie in seconds.
withPath(string $path=null)
Sets the cookie path.
withSecure(bool $secure=null)
Sets if the cookie is a secure cookie or not.
expire()
Expire the cookie.
Class CookieJarWrapperTest.
Definition: Cookie.php:3
getDomain()
Cookie domain.
withValue(string $value=null)
Sets the cookie value.
withHttpOnly(bool $httpOnly=null)
Sets if the cookie is http only.
rememberForLongTime()
Sets the expiration date to +5 years.
getName()
Cookie name.
getHttpOnly()
True if the cookie is http only otherwise false.
getSecure()
True if it&#39;s secure cookie otherwise false.
getValue()
Cookie value.
getExpires()
Expiration date as unix timestamp.
getPath()
Cookie path.
getMaxAge()
Max age measured in seconds.
withExpires($expires=null)
Sets the expiration date of the cookie.
withDomain(string $domain=null)
Sets the domain name for the cookie.