Cookie
class Cookie
Represents a cookie.
Methods
Constructor.
Returns the cookie as a string.
Gets the name of the cookie.
Gets the value of the cookie.
Gets the domain that the cookie is available to.
Gets the time the cookie expires.
Gets the path on the server in which the cookie will be available on.
Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.
Checks whether the cookie will be made accessible only through the HTTP protocol.
Whether this cookie is about to be cleared.
Details
at line line 42
__construct(string $name, string $value = null, int|string|DateTime $expire, string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true)
Constructor.
at line line 78
string
__toString()
Returns the cookie as a string.
at line line 116
string
getName()
Gets the name of the cookie.
at line line 126
string
getValue()
Gets the value of the cookie.
at line line 136
string
getDomain()
Gets the domain that the cookie is available to.
at line line 146
int
getExpiresTime()
Gets the time the cookie expires.
at line line 156
string
getPath()
Gets the path on the server in which the cookie will be available on.
at line line 166
bool
isSecure()
Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.
at line line 176
bool
isHttpOnly()
Checks whether the cookie will be made accessible only through the HTTP protocol.
at line line 186
bool
isCleared()
Whether this cookie is about to be cleared.