Controller类增加batchValidate属性 validate方法增加batch参数,用于设置是否批量验证

异常类改进
This commit is contained in:
thinkphp
2016-06-13 11:09:42 +08:00
parent 00b0c0f229
commit b6b8b6dcb4
12 changed files with 85 additions and 12 deletions

View File

@@ -291,7 +291,7 @@ class Loader
if (class_exists($class)) {
$model = new $class();
} else {
throw new ClassNotFoundException('class [ ' . $class . ' ] not exists');
throw new ClassNotFoundException('class [ ' . $class . ' ] not exists', $class);
}
}
$_model[$name . $layer] = $model;
@@ -327,7 +327,7 @@ class Loader
} elseif ($empty && class_exists($emptyClass = self::parseClass($module, $layer, $empty, $appendSuffix))) {
return new $emptyClass(Request::instance());
} else {
throw new ClassNotFoundException('class [ ' . $class . ' ] not exists');
throw new ClassNotFoundException('class [ ' . $class . ' ] not exists', $class);
}
}
@@ -364,7 +364,7 @@ class Loader
if (class_exists($class)) {
$validate = new $class;
} else {
throw new ClassNotFoundException('class [ ' . $class . ' ] not exists');
throw new ClassNotFoundException('class [ ' . $class . ' ] not exists', $class);
}
}
$_instance[$name . $layer] = $validate;
@@ -428,7 +428,7 @@ class Loader
$_instance[$identify] = $o;
}
} else {
throw new ClassNotFoundException('class not exist :' . $class);
throw new ClassNotFoundException('class not exist :' . $class, $class);
}
}
return $_instance[$identify];