mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
添加方法参数变量约束
This commit is contained in:
@@ -16,17 +16,17 @@ class Cookie
|
||||
|
||||
protected static $config = [
|
||||
// cookie 名称前缀
|
||||
'prefix' => '',
|
||||
'prefix' => '',
|
||||
// cookie 保存时间
|
||||
'expire' => 0,
|
||||
'expire' => 0,
|
||||
// cookie 保存路径
|
||||
'path' => '/',
|
||||
'path' => '/',
|
||||
// cookie 有效域名
|
||||
'domain' => '',
|
||||
'domain' => '',
|
||||
// cookie 启用安全传输
|
||||
'secure' => false,
|
||||
'secure' => false,
|
||||
// httponly设置
|
||||
'httponly' => '',
|
||||
'httponly' => '',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -34,7 +34,7 @@ class Cookie
|
||||
* @param array $config
|
||||
* @return void
|
||||
*/
|
||||
public static function init($config = [])
|
||||
public static function init(array $config = [])
|
||||
{
|
||||
self::$config = array_merge(self::$config, array_change_key_case($config));
|
||||
if (!empty(self::$config['httponly'])) {
|
||||
@@ -157,7 +157,7 @@ class Cookie
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
private static function jsonFormatProtect(&$val, $key, $type = 'encode')
|
||||
{
|
||||
if (!empty($val) && true !== $val) {
|
||||
|
||||
Reference in New Issue
Block a user