mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
Controller类增加batchValidate属性 validate方法增加batch参数,用于设置是否批量验证
异常类改进
This commit is contained in:
@@ -13,4 +13,20 @@ namespace think\exception;
|
||||
|
||||
class ClassNotFoundException extends \RuntimeException
|
||||
{
|
||||
protected $class;
|
||||
public function __construct($message,$class='')
|
||||
{
|
||||
$this->message = $message;
|
||||
$this->class = $class;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取类名
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getClass()
|
||||
{
|
||||
return $this->class;
|
||||
}
|
||||
}
|
||||
@@ -13,4 +13,21 @@ namespace think\exception;
|
||||
|
||||
class TemplateNotFoundException extends \RuntimeException
|
||||
{
|
||||
protected $template;
|
||||
|
||||
public function __construct($message,$template='')
|
||||
{
|
||||
$this->message = $message;
|
||||
$this->template = $template;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取模板文件
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getTemplate()
|
||||
{
|
||||
return $this->template;
|
||||
}
|
||||
}
|
||||
@@ -13,4 +13,20 @@ namespace think\exception;
|
||||
|
||||
class ValidateException extends \RuntimeException
|
||||
{
|
||||
protected $error;
|
||||
|
||||
public function __construct($error)
|
||||
{
|
||||
$this->error = $error;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验证错误信息
|
||||
* @access public
|
||||
* @return array|string
|
||||
*/
|
||||
public function getError()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user