class Cookie

Cookie管理类,封装了对Cookie的操作

Methods

static bool
isExist($key)

判断Cookie是否存在

static bool|mixed
get(string $name)

获取某个Cookie值

static void
set(string $name, mixed $value, int $expire = 0, string $path = '', string $domain = '')

设置某个Cookie值

static void
delete(string $name, string $path = '', string $domain = '')

删除某个Cookie值

static void
clear()

清空Cookie值

Details

at line 30
static bool isExist($key)

判断Cookie是否存在

Parameters

$key string 要判断Cookie

Return Value

bool

at line 42
static bool|mixed get(string $name)

获取某个Cookie值

Parameters

string $name 要获取的cookie名称

Return Value

bool|mixed

at line 60
static void set(string $name, mixed $value, int $expire = 0, string $path = '', string $domain = '')

设置某个Cookie值

Parameters

string $name 要设置的cookie的名称
mixed $value 要设置的值
int $expire 过期时间
string $path path
string $domain domain

Return Value

void

at line 81
static void delete(string $name, string $path = '', string $domain = '')

删除某个Cookie值

Parameters

string $name 要删除的cookie的名称
string $path path
string $domain domain

Return Value

void

at line 92
static void clear()

清空Cookie值

Return Value

void