添加方法参数变量约束

This commit is contained in:
thinkphp
2016-01-21 12:21:04 +08:00
parent 680aa8cd66
commit 4f511dc3e9
6 changed files with 35 additions and 36 deletions

View File

@@ -29,7 +29,7 @@ class Cache
* @param array $options 配置数组
* @return object
*/
public static function connect($options = [])
public static function connect(array $options = [])
{
$type = !empty($options['type']) ? $options['type'] : 'File';
$class = (!empty($options['namespace']) ? $options['namespace'] : '\\think\\cache\\driver\\') . ucwords($type);