Class: WindNormalCookie
Source Location: /http/cookie/WindNormalCookie.php
Class WindNormalCookie
Inherited Properties, Constants, and Methods
Method Summary
void |
exist() |
判断cookie值是否存在 |
Methods
void __construct(
[string
$prefix = null], [boolean
$encode = false], [string|int
$expires = null], [string
$path = null], [string
$domain = null], [boolean
$secure = false], [boolean
$httponly = false]
)
|
|
构造函数
根据传入的cookie数据初始化cookie数据
Parameters:
string|int |
$expires: |
过期时间,默认为null即会话cookie,随着会话结束将会销毁 |
boolean |
$encode: |
是否使用 MIME base64 对数据进行编码,默认是false即不进行编码 |
string |
$prefix: |
cookie前缀,默认为null即没有前缀 |
string |
$path: |
cookie保存的路径,默认为null即采用默认 |
string |
$domain: |
cookie所属域,默认为null即不设置 |
boolean |
$secure: |
是否安全连接,默认为false即不采用安全链接 |
boolean |
$httponly: |
是否可通过客户端脚本访问,默认为false即客户端脚本可以访问cookie |
API Tags:
void exist(
string
$name
)
|
|
判断cookie值是否存在
Parameters:
API Tags:
获取cookie的域
API Tags:
Return: | 获得cookie域 |
Access: | public |
获取cookie的过期时间
API Tags:
Return: | 获得cookie的过期时间 |
Access: | public |
获取cookie的路径
API Tags:
Return: | 获得cookie保存路径 |
Access: | public |
boolean set(
string
$name, mixed
$value
)
|
|
设置cookie
Parameters:
string |
$name: |
|
mixed |
$value: |
|
API Tags:
Implementation of:
- IWindHttpContainer::set()
- 向容器中设置值
|
|