From 6858abef7cfd3f114e1bbcab728c8c075d026f53 Mon Sep 17 00:00:00 2001 From: trojanbox Date: Mon, 30 May 2016 18:14:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Response.php | 1 + library/think/cache/driver/File.php | 7 ++++--- library/think/cache/driver/Xcache.php | 1 + library/traits/controller/Jump.php | 2 +- library/traits/think/Instance.php | 4 +++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/library/think/Response.php b/library/think/Response.php index 5b86e940..a59e23e5 100644 --- a/library/think/Response.php +++ b/library/think/Response.php @@ -66,6 +66,7 @@ class Response * @param mixed $data 输出数据 * @param string $type 输出类型 * @param array $options 输出参数 + * @return Response */ public static function create($data = [], $type = '', $options = []) { diff --git a/library/think/cache/driver/File.php b/library/think/cache/driver/File.php index 2c0ddff1..d8487102 100644 --- a/library/think/cache/driver/File.php +++ b/library/think/cache/driver/File.php @@ -32,7 +32,7 @@ class File /** * 架构函数 - * @access public + * @param array $options */ public function __construct($options = []) { @@ -54,10 +54,11 @@ class File { // 创建项目缓存目录 if (!is_dir($this->options['path'])) { - if (!mkdir($this->options['path'], 0755, true)) { - return false; + if (mkdir($this->options['path'], 0755, true)) { + return true; } } + return false; } /** diff --git a/library/think/cache/driver/Xcache.php b/library/think/cache/driver/Xcache.php index a529bed3..00a0483f 100644 --- a/library/think/cache/driver/Xcache.php +++ b/library/think/cache/driver/Xcache.php @@ -30,6 +30,7 @@ class Xcache * 架构函数 * @param array $options 缓存参数 * @access public + * @throws Exception */ public function __construct($options = []) { diff --git a/library/traits/controller/Jump.php b/library/traits/controller/Jump.php index ae5aaf90..c0c6b1b0 100644 --- a/library/traits/controller/Jump.php +++ b/library/traits/controller/Jump.php @@ -29,7 +29,7 @@ trait Jump * @param string $url 跳转的URL地址 * @param mixed $data 返回的数据 * @param integer $wait 跳转等待时间 - * @return void + * @return array */ public function success($msg = '', $url = null, $data = '', $wait = 3) { diff --git a/library/traits/think/Instance.php b/library/traits/think/Instance.php index d85975b3..de123079 100644 --- a/library/traits/think/Instance.php +++ b/library/traits/think/Instance.php @@ -11,6 +11,8 @@ namespace traits\think; +use \think\Exception; + trait Instance { protected static $instance = null; @@ -37,7 +39,7 @@ trait Instance if (0 === strpos($method, '_') && is_callable([self::$instance, $call])) { return call_user_func_array([self::$instance, $call], $params); } else { - throw new \think\Exception("not exists method:" . $method); + throw new Exception("not exists method:" . $method); } } }