Cookie
class Cookie (View source)
Properties
protected | $name | ||
protected | $value | ||
protected | $domain | ||
protected | $expire | ||
protected | $path | ||
protected | $secure | ||
protected | $httpOnly | ||
protected | $sameSite |
Methods
Konstruktor.
Mereturn object cookie sebagai string.
Ambil nama cookie.
Ambil value cookie.
Ambil domain cookie.
Ambil waktu kedaluwarsa cookie.
Ambil path cookie di server.
Cek apakah cookie hanya boleh dikirimkan via HTTPS saja.
Cek apakah cookie hanya boleh tersedia via HTTP saja.
Cek apakah cookie sudah waktunya untuk dibersihkan.
Ambil atribut samesite cookie.
Details
__construct(string $name, string $value = null, int|string|DateTime $expire = 0, string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, $sameSite = 'lax')
Konstruktor.
string
__toString()
Mereturn object cookie sebagai string.
string
getName()
Ambil nama cookie.
string
getValue()
Ambil value cookie.
string
getDomain()
Ambil domain cookie.
int
getExpiresTime()
Ambil waktu kedaluwarsa cookie.
string
getPath()
Ambil path cookie di server.
bool
isSecure()
Cek apakah cookie hanya boleh dikirimkan via HTTPS saja.
bool
isHttpOnly()
Cek apakah cookie hanya boleh tersedia via HTTP saja.
bool
isCleared()
Cek apakah cookie sudah waktunya untuk dibersihkan.
string
getSameSite()
Ambil atribut samesite cookie.