Properties

$module

$module : 

Type

$uid

$uid : 

Type

$admin

$admin : 

Type

$member

$member : 

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

$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

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() 

index_del()

index_del() 

_Index()

_Index(  $html) 

Parameters

$html

_Donation()

_Donation(  $id,   $rt) 

Parameters

$id
$rt

_Category()

_Category(  $catid,   $catdir = null,   $page = 1) 

Parameters

$catid
$catdir
$page

_Search()

_Search(  $_catid) 

Parameters

$_catid

_Show()

_Show(  $id,   $param = array(),   $page = 1,   $rt) 

Parameters

$id
$param
$page
$rt

_MyShow()

_MyShow(  $type,   $id,   $page = 1) 

Parameters

$type
$id
$page

_Create_Category_Html()

_Create_Category_Html(  $catid,   $page) 

Parameters

$catid
$page

_Create_Show_Html()

_Create_Show_Html(  $id,   $page) 

Parameters

$id
$page

_Category_Html_File()

_Category_Html_File() 

_Show_Html_File()

_Show_Html_File() 

_Index_Html()

_Index_Html() 

_Show_Html()

_Show_Html() 

_Category_Html()

_Category_Html() 

_Call_Show()

_Call_Show(  $data) 

Parameters

$data

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