Properties

$authMenuList

$authMenuList : 

Type

$authMenuUrlList

$authMenuUrlList : 

Type

$authMenuTree

$authMenuTree : 

Type

$menuView

$menuView : 

Type

$crumbsView

$crumbsView : 

Type

$title

$title : 

Type

$param

$param : 

Type

$view

$view : \think\View

Type

\think\View — 视图类实例

$request

$request : \think\Request

Type

\think\Request — Request 实例

$failException

$failException : boolean

Type

boolean — 验证失败是否抛出异常

$batchValidate

$batchValidate : boolean

Type

boolean — 是否批量验证

$beforeActionList

$beforeActionList : array

Type

array — 前置操作方法列表

Methods

__construct()

__construct(\think\Request  $request = null) 

构造方法

Parameters

\think\Request $request

Request 对象

__get()

__get(  $name) 

获取逻辑层实例

Parameters

$name

execute()

execute(  $addon_name = null,   $controller_name = null,   $action_name = null) 

执行插件控制器

Parameters

$addon_name
$controller_name
$action_name

addon_install()

addon_install(  $name = null) 

执行插件安装

Parameters

$name

addon_uninstall()

addon_uninstall(  $name = null) 

执行插件卸载

Parameters

$name

addon_list()

addon_list() 

插件列表

hook_list()

hook_list() 

钩子列表

setTitle()

setTitle(  $title = '') 

设置指定标题

Parameters

$title

getContentHeader()

getContentHeader(  $describe = '') 

获取内容头部视图

Parameters

$describe

fetch()

fetch(string  $template = '', array  $vars = array(), array  $replace = array(), array  $config = array()) : mixed

加载模板输出

Parameters

string $template

模板文件名

array $vars

模板输出变量

array $replace

模板替换

array $config

模板参数

Returns

mixed

_initialize()

_initialize() 

初始化操作

jump()

jump(  $jump_type = null,   $message = null,   $url = null) 

系统通用跳转

Parameters

$jump_type
$message
$url

parseJumpArray()

parseJumpArray(  $jump_array = array()) 

解析跳转数组

Parameters

$jump_array

initCommonStatic()

initCommonStatic() 

初始化全局静态资源

beforeAction()

beforeAction(string  $method, array  $options = array()) : void

前置操作

Parameters

string $method

前置操作方法名

array $options

调用参数 ['only'=>[...]] 或者 ['except'=>[...]]

display()

display(string  $content = '', array  $vars = array(), array  $replace = array(), array  $config = array()) : mixed

渲染内容输出

Parameters

string $content

模板内容

array $vars

模板输出变量

array $replace

替换内容

array $config

模板参数

Returns

mixed

assign()

assign(mixed  $name, mixed  $value = '') : $this

模板变量赋值

Parameters

mixed $name

要显示的模板变量

mixed $value

变量的值

Returns

$this

engine()

engine(array|string  $engine) : $this

初始化模板引擎

Parameters

array|string $engine

引擎参数

Returns

$this

validateFailException()

validateFailException(boolean  $fail = true) : $this

设置验证失败后是否抛出异常

Parameters

boolean $fail

是否抛出异常

Returns

$this

validate()

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

验证数据

Parameters

array $data

数据

string|array $validate

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

array $message

提示信息

boolean $batch

是否批量验证

mixed $callback

回调方法(闭包)

Throws

\think\exception\ValidateException

Returns

array|string|true

success()

success(mixed  $msg = '', string  $url = null, mixed  $data = '', integer  $wait = 3, array  $header = array()) : void

操作成功跳转的快捷方法

Parameters

mixed $msg

提示信息

string $url

跳转的 URL 地址

mixed $data

返回的数据

integer $wait

跳转等待时间

array $header

发送的 Header 信息

Throws

\think\exception\HttpResponseException

error()

error(mixed  $msg = '', string  $url = null, mixed  $data = '', integer  $wait = 3, array  $header = array()) : void

操作错误跳转的快捷方法

Parameters

mixed $msg

提示信息

string $url

跳转的 URL 地址

mixed $data

返回的数据

integer $wait

跳转等待时间

array $header

发送的 Header 信息

Throws

\think\exception\HttpResponseException

result()

result(mixed  $data, integer  $code, mixed  $msg = '', string  $type = '', array  $header = array()) : void

返回封装后的 API 数据到客户端

Parameters

mixed $data

要返回的数据

integer $code

返回的 code

mixed $msg

提示信息

string $type

返回数据格式

array $header

发送的 Header 信息

Throws

\think\exception\HttpResponseException

redirect()

redirect(string  $url, array|integer  $params = array(), integer  $code = 302, array  $with = array()) : void

URL 重定向

Parameters

string $url

跳转的 URL 表达式

array|integer $params

其它 URL 参数

integer $code

http code

array $with

隐式传参

Throws

\think\exception\HttpResponseException

getResponseType()

getResponseType() : string

获取当前的 response 输出类型

Returns

string

initAdminInfo()

initAdminInfo() 

初始化后台模块信息

initBaseInfo()

initBaseInfo() 

初始化基础数据

initAdminConst()

initAdminConst() 

初始化后台模块常量

initRequestInfo()

initRequestInfo() 

初始化请求信息

initResponseType()

initResponseType() 

初始化响应类型