Properties

$dfield

$dfield : 

Type

$init

$init : 

Type

$is_get_catid

$is_get_catid : 

Type

$uid

$uid : 

Type

$admin

$admin : 

Type

$member

$member : 

Type

$module

$module : 

Type

$member_cache

$member_cache : 

Type

$member_authid

$member_authid : 

Type

$site

$site : 

Type

$site_info

$site_info : 

Type

$site_domain

$site_domain : 

Type

$is_hcategory

$is_hcategory : 

Type

$session

$session : 

Type

$is_mobile

$is_mobile : 

Type

$temp

$temp : 

Type

$field

$field : 

Type

$sys_field

$sys_field : 

Type

$form_rule

$form_rule : 

Type

$is_data

$is_data : 

Type

$is_post_code

$is_post_code : 

Type

$is_module_index

$is_module_index : 

Type

$is_category_data_field

$is_category_data_field : 

Type

$edit_where

$edit_where : 

Type

$delete_where

$delete_where : 

Type

$name

$name : 

Type

$tpl_name

$tpl_name : 

Type

$tpl_prefix

$tpl_prefix : 

Type

$list_pagesize

$list_pagesize : 

Type

$auto_save

$auto_save : 

Type

$replace_id

$replace_id : 

Type

$url_params

$url_params : 

Type

$is_module_init

$is_module_init : 

Type

$cmf_version

$cmf_version : 

Type

$helpers

$helpers : array

An array of helpers to be automatically loaded upon class instantiation.

Type

array

$forceHTTPS

$forceHTTPS : integer

Whether HTTPS access should be enforced for all methods in this controller.

Type

integer — Number of seconds to set HSTS header

$instance

$instance : 

Type

$load_init

$load_init : 

Type

Methods

__construct()

__construct(  $params) 

初始化共享控制器

Parameters

$params

_tpl_filename()

_tpl_filename(  $name) 

Parameters

$name

init_file()

init_file(  $namespace) 

插件目录初始化文件

Parameters

$namespace

session()

session() 

开启session

get_cache()

get_cache(  $params) 

读取缓存

Parameters

$params

_module_init()

_module_init(  $dirname = '',   $siteid = SITE_ID) 

Parameters

$dirname
$siteid

_json()

_json(  $code,   $msg,   $data = array()) 

统一返回json格式并退出程序

Parameters

$code
$msg
$data

_jsonp()

_jsonp(  $code,   $msg,   $data = array()) 

统一返回jsonp格式并退出程序

Parameters

$code
$msg
$data

_require_array()

_require_array(  $file) 

加载数组配置文件

Parameters

$file

_admin_msg()

_admin_msg(  $code,   $msg,   $url = '',   $time = 3) 

后台提示信息

Parameters

$code
$msg
$url
$time

_msg()

_msg(  $code,   $msg,   $url = '',   $time = 3) 

前台提示信息

Parameters

$code
$msg
$url
$time

get_attachment()

get_attachment(  $id) 

附件信息

Parameters

$id

_member_option()

_member_option(  $call = 1) 

后台登录判断

Parameters

$call

_member_auth_value()

_member_auth_value(  $authid,   $name) 

获取用户组权限的积分及统计参数累计

Parameters

$authid
$name

_member_value()

_member_value(  $authid,   $value) 

获取网站用户的积分及统计参数累计

Parameters

$authid
$value

_module_member_value()

_module_member_value(  $catid,   $dir,   $auth,   $authid = array(0)) 

获取模块栏目的积分及统计参数累计

Parameters

$catid
$dir
$auth
$authid

_module_member_category()

_module_member_category(  $category,   $dir,   $auth) 

判断模块栏目是否具有用户操作权限

Parameters

$category
$dir
$auth

_is_admin_auth()

_is_admin_auth(  $uri = '') 

判断后台uri是否具有操作权限

Parameters

$uri

_is_mobile()

_is_mobile() 

是否移动端访问访问

get_instance()

get_instance() 

Get the CI singleton

index()

index() 

edit()

edit() 

del()

del() 

_init()

_init(  $data) 

Parameters

$data

_field_save()

_field_save(  $catid) 

Parameters

$catid

_field_group()

_field_group(  $data) 

字段进行分组

Parameters

$data

_Data()

_Data(  $id) 

获取内容 $id 内容id,新增为0

Parameters

$id

_Display_Order()

_Display_Order(  $id,   $value,   $after = null) 

排序值操作 $id 内容id

Parameters

$id
$value
$after

_Format_Data()

_Format_Data(  $id,   $data,   $old) 

Parameters

$id
$data
$old

_Save()

_Save(  $id,   $data = array(),   $old = array(),   $before = null,   $after = null) 

保存内容 $id 内容id,新增为0 $data 提交内容数组,留空为自动获取 $old 老数据 $func 格式化提交的数据 提交前 $func 格式化提交的数据 保存后

Parameters

$id
$data
$old
$before
$after

_Post()

_Post(  $id,   $draft = array(),   $is_data,   $is_post) 

提交内容 $id 内容id,新增为0,否则视为修改 $draft 草稿数据 $is_data 将内容数据返回到data数组里面 $is_post 强制post执行

Parameters

$id
$draft
$is_data
$is_post

_Call_Post()

_Call_Post(  $data) 

回调保存或添加结果

Parameters

$data

_Show()

_Show(  $id) 

显示内容 $id 内容id,新增为0,否则视为修改

Parameters

$id

_Del()

_Del(  $ids,   $before = null,   $after = null,   $attach) 

批量删除数据 $ids $before 删除前执行的操作 $after 删除后执行的操作 $attach 删除关联附件

Parameters

$ids
$before
$after
$attach

_List()

_List(  $p = array(),   $size) 

数据列表显示 $p URL指定参数 $size 指定分页数据量

Parameters

$p
$size

cachePage()

cachePage(integer  $time) 

Provides a simple way to tie into the main CodeIgniter class and tell it how long to cache the current page for.

Parameters

integer $time

goto_404_page()

goto_404_page(  $msg) 

引用404页面

Parameters

$msg

_html_msg()

_html_msg(  $code,   $msg,   $url = '',   $note = '') 

生成静态时的跳转提示

Parameters

$code
$msg
$url
$note

_is_admin_login()

_is_admin_login() 

后台登录判断

_api_auth()

_api_auth() 

Api认证匹配

_app_clink()

_app_clink() 

插件的clink值

_app_cbottom()

_app_cbottom() 

插件的cbottom值

_main_table()

_main_table() 

获取可用后table区域

forceHTTPS()

forceHTTPS(integer  $duration = 31536000) 

A convenience method to use when you need to ensure that a single method is reached only via HTTPS. If it isn't, then a redirect will happen back to this method and HSTS header will be sent to have modern browsers transform requests automatically.

Parameters

integer $duration

The number of seconds this link should be considered secure for. Only with HSTS header. Default value is 1 year.

Throws

\CodeIgniter\HTTP\Exceptions\HTTPException

loadHelpers()

loadHelpers() 

Handles "auto-loading" helper files.

validate()

validate(array|string  $rules, array  $messages = array()) : boolean

A shortcut to performing validation on input data. If validation is not successful, a $errors property will be set on this class.

Parameters

array|string $rules
array $messages

An array of custom error messages

Returns

boolean

_tuikuan()

_tuikuan(  $value,   $item) 

Parameters

$value
$item