Merge pull request #60 from vus520/master

修复一个错误变量,完善注释
This commit is contained in:
ThinkPHP
2016-05-08 08:16:11 +08:00
34 changed files with 39 additions and 33 deletions

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think; namespace think;
class Build class Build

View File

@@ -11,7 +11,6 @@
namespace think; namespace think;
use ArrayAccess; use ArrayAccess;
use ArrayIterator; use ArrayIterator;
use Countable; use Countable;

View File

@@ -29,7 +29,6 @@ class File extends SplFileObject
*/ */
protected function checkPath($path) protected function checkPath($path)
{ {
if (is_dir($path)) { if (is_dir($path)) {
return true; return true;
} }
@@ -37,7 +36,7 @@ class File extends SplFileObject
if (mkdir($path, 0777, true)) { if (mkdir($path, 0777, true)) {
return true; return true;
} else { } else {
$this->error = "目录 {$savepath} 创建失败!"; $this->error = "目录 {$path} 创建失败!";
return false; return false;
} }
} }

View File

@@ -29,7 +29,10 @@ class Log
// 通知发送驱动 // 通知发送驱动
protected static $alarm = null; protected static $alarm = null;
// 日志初始化 /**
* 日志初始化
* @return void
*/
public static function init($config = []) public static function init($config = [])
{ {
$type = isset($config['type']) ? $config['type'] : 'File'; $type = isset($config['type']) ? $config['type'] : 'File';
@@ -40,7 +43,10 @@ class Log
APP_DEBUG && Log::record('[ LOG ] INIT ' . $type . ': ' . var_export($config, true), 'info'); APP_DEBUG && Log::record('[ LOG ] INIT ' . $type . ': ' . var_export($config, true), 'info');
} }
// 通知初始化 /**
* 通知初始化
* @return void
*/
public static function alarm($config = []) public static function alarm($config = [])
{ {
$type = isset($config['type']) ? $config['type'] : 'Email'; $type = isset($config['type']) ? $config['type'] : 'Email';
@@ -128,7 +134,10 @@ class Log
self::$alarm && self::$alarm->send($msg); self::$alarm && self::$alarm->send($msg);
} }
// 静态调用 /**
* 静态调用
* @return void
*/
public static function __callStatic($method, $args) public static function __callStatic($method, $args)
{ {
if (in_array($method, self::$type)) { if (in_array($method, self::$type)) {

View File

@@ -11,7 +11,6 @@
namespace think; namespace think;
use think\paginator\Collection as PaginatorCollection; use think\paginator\Collection as PaginatorCollection;
abstract class Paginator abstract class Paginator

View File

@@ -11,7 +11,6 @@
namespace think; namespace think;
use think\process\exception\Failed as ProcessFailedException; use think\process\exception\Failed as ProcessFailedException;
use think\process\exception\Timeout as ProcessTimeoutException; use think\process\exception\Timeout as ProcessTimeoutException;
use think\process\pipes\Pipes; use think\process\pipes\Pipes;

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think; namespace think;
class Session class Session

View File

@@ -11,7 +11,6 @@
namespace think\console\helper; namespace think\console\helper;
class Debug extends Helper class Debug extends Helper
{ {

View File

@@ -11,7 +11,6 @@
namespace think\console\helper; namespace think\console\helper;
use think\console\Output; use think\console\Output;
use think\process\Builder as ProcessBuilder; use think\process\Builder as ProcessBuilder;
use think\process as ThinkProcess; use think\process as ThinkProcess;

View File

@@ -11,7 +11,6 @@
namespace think\console\helper; namespace think\console\helper;
use think\console\Input; use think\console\Input;
use think\console\Output; use think\console\Output;
use think\console\helper\question\Question as OutputQuestion; use think\console\helper\question\Question as OutputQuestion;

View File

@@ -11,7 +11,6 @@
namespace think\console\helper; namespace think\console\helper;
use think\console\command\Command; use think\console\command\Command;
class Set implements \IteratorAggregate class Set implements \IteratorAggregate

View File

@@ -11,7 +11,6 @@
namespace think\console\input; namespace think\console\input;
class Argument class Argument
{ {

View File

@@ -11,7 +11,6 @@
namespace think\console\input; namespace think\console\input;
class Definition class Definition
{ {

View File

@@ -11,7 +11,6 @@
namespace think\console\output; namespace think\console\output;
use think\console\Output; use think\console\Output;
class Nothing extends Output class Nothing extends Output

View File

@@ -11,7 +11,6 @@
namespace think\console\output; namespace think\console\output;
class Stream class Stream
{ {

View File

@@ -11,7 +11,6 @@
namespace think\console\output\formatter; namespace think\console\output\formatter;
class Stack class Stack
{ {

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\controller; namespace think\controller;
/** /**

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\controller; namespace think\controller;
/** /**

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\controller; namespace think\controller;
/** /**

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\controller; namespace think\controller;
/** /**

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\log\alarm; namespace think\log\alarm;
/** /**

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\log\driver; namespace think\log\driver;
/** /**

View File

@@ -1,13 +1,5 @@
<?php <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think\log\driver; namespace think\log\driver;
/** /**

View File

@@ -1,10 +1,20 @@
<?php <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: luofei614 <weibo.com/luofei614>
// +----------------------------------------------------------------------
namespace think\log\driver;
/** /**
* github: https://github.com/luofei614/SocketLog * github: https://github.com/luofei614/SocketLog
* @author luofei614<weibo.com/luofei614> * @author luofei614<weibo.com/luofei614>
*/ */
namespace think\log\driver;
class Socket class Socket
{ {
public $port = 1116; //SocketLog 服务的http的端口号 public $port = 1116; //SocketLog 服务的http的端口号

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\log\driver; namespace think\log\driver;
/** /**

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\log\driver; namespace think\log\driver;
use think\Config; use think\Config;

View File

@@ -9,7 +9,6 @@
namespace think\process; namespace think\process;
class Utils class Utils
{ {

View File

@@ -11,7 +11,6 @@
namespace think\process\exception; namespace think\process\exception;
use think\Process; use think\Process;
class Timeout extends \RuntimeException class Timeout extends \RuntimeException

View File

@@ -11,7 +11,6 @@
namespace think\process\pipes; namespace think\process\pipes;
use think\Process; use think\Process;
class Unix extends Pipes class Unix extends Pipes

View File

@@ -11,7 +11,6 @@
namespace think\process\pipes; namespace think\process\pipes;
use think\Process; use think\Process;
class Windows extends Pipes class Windows extends Pipes

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\view\driver; namespace think\view\driver;
use think\Exception; use think\Exception;

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think\view\driver; namespace think\view\driver;
use think\Exception; use think\Exception;

View File

@@ -11,7 +11,6 @@
namespace think; namespace think;
use think\Console; use think\Console;
class App class App

View File

@@ -8,6 +8,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com> // | Author: yunwuxin <448901948@qq.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace think; namespace think;
class Error class Error