注释和规范化调整及完善

注释和规范化调整及完善,以及部分代码优化
This commit is contained in:
yicheng
2015-12-06 01:56:10 +08:00
parent 491e33af8f
commit 47335634e9
37 changed files with 385 additions and 187 deletions

View File

@@ -229,12 +229,14 @@ class Loader
return false;
}
}
/**
* 取得对象实例 支持调用类的静态方法
* @param string $class 对象类名
*
* @param string $class 对象类名
* @param string $method 类的静态方法名
* @return object
*
* @return mixed
* @throws Exception
*/
public static function instance($class, $method = '')
{
@@ -244,7 +246,7 @@ class Loader
if (class_exists($class)) {
$o = new $class();
if (!empty($method) && method_exists($o, $method)) {
$_instance[$identify] = call_user_func_array([ & $o, $method]);
$_instance[$identify] = call_user_func_array([ & $o, $method],[]);
} else {
$_instance[$identify] = $o;
}