PHP Class Cml\Http\Cookie

Show file Open project: linhecheng/cmlphp Class Usage Examples

Public Methods

Method Description
clear ( ) : void 清空Cookie值
delete ( string $name ) : void 删除某个Cookie值
get ( string $name ) : boolean | mixed 获取某个Cookie值
isExist ( $key ) : boolean 判断Cookie是否存在
set ( string $name, mixed $value, integer $expire, string $path = '', string $domain = '' ) : void 设置某个Cookie值

Method Details

clear() public static method

清空Cookie值
public static clear ( ) : void
return void

delete() public static method

删除某个Cookie值
public static delete ( string $name ) : void
$name string 要删除的cookie的名称
return void

get() public static method

获取某个Cookie值
public static get ( string $name ) : boolean | mixed
$name string 要获取的cookie名称
return boolean | mixed

isExist() public static method

判断Cookie是否存在
public static isExist ( $key ) : boolean
$key string 要判断Cookie
return boolean

set() public static method

设置某个Cookie值
public static set ( string $name, mixed $value, integer $expire, string $path = '', string $domain = '' ) : void
$name string 要设置的cookie的名称
$value mixed 要设置的值
$expire integer 过期时间
$path string path
$domain string domain
return void