\appBaseController

控制器基础类

Summary

Methods
Properties
Constants
__construct()
No public properties found
No constants found
initialize()
validate()
$request
$app
$batchValidate
$middleware
N/A
No private methods found
No private properties found
N/A

Properties

$request

$request : \think\Request

Request实例

Type

\think\Request

$app

$app : \think\App

应用实例

Type

\think\App

$batchValidate

$batchValidate : boolean

是否批量验证

Type

boolean

$middleware

$middleware : array

控制器中间件

Type

array

Methods

__construct()

__construct(\think\App  $app) 

构造方法

Parameters

\think\App $app

应用对象

initialize()

initialize() 

validate()

validate(array  $data, string|array  $validate, array  $message = array(), boolean  $batch = false) : array|string|true

验证数据

Parameters

array $data

数据

string|array $validate

验证器名或者验证规则数组

array $message

提示信息

boolean $batch

是否批量验证

Throws

\think\exception\ValidateException

Returns

array|string|true