class CookieHelper

Cookie Helper file

Methods

static bool
has(string $name)

判断Cookie是否存在

static string
get(string $name)

获取某个Cookie值

static bool
set(string $name, string|null $value, int $expire = 0, string $path = '', string $domain = '')

设置某个 Cookie 的值

static void
remove(string $name)

删除某个Cookie值

static void
clear()

清空所有Cookie值

Details

at line 17
static bool has(string $name)

判断Cookie是否存在

Parameters

string $name name

Return Value

bool

at line 27
static string get(string $name)

获取某个Cookie值

Parameters

string $name name

Return Value

string

at line 41
static bool set(string $name, string|null $value, int $expire = 0, string $path = '', string $domain = '')

设置某个 Cookie 的值

Parameters

string $name

cookie name

string|null $value

cookie value

int $expire

expired time

string $path path
string $domain domain

Return Value

bool

at line 59
static void remove(string $name)

删除某个Cookie值

Parameters

string $name name

Return Value

void

at line 68
static void clear()

清空所有Cookie值

Return Value

void