class Cookie
Represents a cookie.
Methods
__construct(string $name, string $value = null, int|string|DateTimeInterface $expire, string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, bool $raw = false) Constructor. | ||
string | __toString() Returns the cookie as a string. | |
string | getName() Gets the name of the cookie. | |
string | getValue() Gets the value of the cookie. | |
string | getDomain() Gets the domain that the cookie is available to. | |
int | getExpiresTime() Gets the time the cookie expires. | |
string | getPath() Gets the path on the server in which the cookie will be available on. | |
bool | isSecure() Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client. | |
bool | isHttpOnly() Checks whether the cookie will be made accessible only through the HTTP protocol. | |
bool | isCleared() Whether this cookie is about to be cleared. | |
bool | isRaw() Checks if the cookie value should be sent with no url encoding. |
Details
__construct(string $name, string $value = null, int|string|DateTimeInterface $expire, string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, bool $raw = false)
Constructor.
string __toString()
Returns the cookie as a string.
string getName()
Gets the name of the cookie.
string getValue()
Gets the value of the cookie.
string getDomain()
Gets the domain that the cookie is available to.
int getExpiresTime()
Gets the time the cookie expires.
string getPath()
Gets the path on the server in which the cookie will be available on.
bool isSecure()
Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.
bool isHttpOnly()
Checks whether the cookie will be made accessible only through the HTTP protocol.
bool isCleared()
Whether this cookie is about to be cleared.
bool isRaw()
Checks if the cookie value should be sent with no url encoding.
Please login to continue.