ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Cookie.php
Go to the documentation of this file.
1<?php
2
4
16interface 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}
An exception for terminatinating execution or to throw for unit testing.
getHttpOnly()
True if the cookie is http only otherwise false.
rememberForLongTime()
Sets the expiration date to +5 years.
getExpires()
Expiration date as unix timestamp.
withMaxAge(int $maxAge=null)
Maximal life time of the cookie in seconds.
getValue()
Cookie value.
withPath(string $path=null)
Sets the cookie path.
getDomain()
Cookie domain.
withValue(string $value=null)
Sets the cookie value.
withSecure(bool $secure=null)
Sets if the cookie is a secure cookie or not.
withHttpOnly(bool $httpOnly=null)
Sets if the cookie is http only.
withExpires($expires=null)
Sets the expiration date of the cookie.
expire()
Expire the cookie.
getMaxAge()
Max age measured in seconds.
withDomain(string $domain=null)
Sets the domain name for the cookie.
getSecure()
True if it's secure cookie otherwise false.
__toString()
Returns the string representation of the object.
Class CookieJarWrapperTest.
Definition: Cookie.php:3