$version
$version : string
zbp全局操作类.
$db : \Database__Interface
$members : array<mixed,\Member>
| None found |
$membersbyname : array<mixed,\Member>
| None found |
$categorys : array<mixed,\Category>
| None found |
$categorysbyorder : array<mixed,\Category>
| None found |
$modules : array<mixed,\Module>
| None found |
$modulesbyfilename : array<mixed,\Module>
| None found |
$configs : array<mixed,\Config>
| None found |
$tags : array<mixed,\Tag>
| None found |
$tagsbyname : array<mixed,\Tag>
| None found |
$comments : array<mixed,\Comment>
| None found |
$posts : array<mixed,\Post>
| None found |
$theme : \App
| None found |
$user : \Member
| None found |
$cache : \Config
| None found |
$template : \Template
| None found |
$themeapp : \App
| None found |
GetInstance() : null|\ZBlogPHP
获取唯一实例.
| None found |
InitializeDB(string $type) : \Database__Interface
初始化数据库连接.
| string | $type | 数据连接类型 |
| None found |
| None found |
| None found |
| api |
Filter_Plugin_Zbp_Call |
|---|
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
LoadConfigsOnlySystem( $onlysystemoption = true)
| $onlysystemoption |
| None found |
SaveConfig(string $name) : boolean
保存Configs表.
| string | $name | Configs表名 |
| None found |
DelConfig(string $name) : boolean
删除Configs表.
| string | $name | Configs表名 |
| None found |
| None found |
HasConfig(string $name) : boolean
查某Config是否存在.
| string | $name | Configs表名 |
| None found |
| None found |
| None found |
| None found |
| None found |
CheckRights(string $action, integer|string $level = null) : boolean
验证操作权限.
| string | $action | 操作 |
| integer|string | $level |
| None found |
CheckRightsByLevel(string $action, integer $level) : boolean
根据用户等级验证操作权限 1.5开始参数换顺序.
| string | $action | 操作 |
| integer | $level | 用户等级 |
| None found |
| None found |
VerifyResult(\Member $m) : string
返回登录成功后应保存的cookie信息.
| \Member | $m | 已验过成功的member |
| None found |
GenerateUserToken(\Member $user, integer $time) : string
生成User Token,用于登录验证
| \Member | $user | |
| integer | $time |
| None found |
VerifyUserToken(string $token, string $username) : \Member
验证用户登录Token.
| string | $token | |
| string | $username |
| None found |
Verify_MD5(string $name, string $md5pw, \Member $member) : boolean
验证用户登录(一次MD5密码).
| string | $name | 用户名 |
| string | $md5pw | md5加密后的密码 |
| \Member | $member | 返回读取成功的member对象 |
| None found |
Verify_Original(string $name, string $originalpw, \Member $member = null) : boolean
验证用户登录(原始明文密码).
| string | $name | 用户名 |
| string | $originalpw | 密码明文 |
| \Member | $member | 返回读取成功的member对象 |
| None found |
Verify_Final(string $name, string $password, object $member = null) : boolean
验证用户登录(数据库保存的最终运算后密码).
| string | $name | 用户名 |
| string | $password | 二次加密后的密码 |
| object | $member | 返回读取成功的member对象 |
| None found |
Verify_Token(string $name, string $wt, string $wt_id, object $member = null) : boolean
验证用户登录(使用Token,替代密码保存).
| string | $name | 用户名 |
| string | $wt | WebToken |
| string | $wt_id | WebToken的ID识别符 |
| object | $member | 返回读取成功的member对象 |
| None found |
LoadMembers(integer $level) : boolean
载入用户列表.
| integer | $level | 用户等级 |
| None found |
| None found |
| None found |
| None found |
LoadThemes() : array<mixed,\App>
载入主题列表.
| None found |
LoadPlugins() : array<mixed,\App>
载入插件列表.
| None found |
LoadApp(string $type, string $id) : \App
载入指定应用.
| string | $type | 应用类型(theme|plugin) |
| string | $id | 应用ID |
| None found |
CheckPlugin(string $name) : boolean
检查应用是否安装并启用.
| string | $name | 应用(插件或主题)的ID |
| None found |
CheckApp(string $name) : boolean
检查应用是否安装并启用.
| string | $name | 应用ID(插件或主题) |
| None found |
GetPreActivePlugin() : array<mixed,string>
获取预激活插件名数组.
| None found |
LoadLanguage(string $type, string $id, string $default = '') : null
载入指定应用语言包.
| string | $type | 应用类型(system|theme|plugin) |
| string | $id | 应用ID |
| string | $default | 默认语言 |
| None found |
| None found |
| None found |
PrepareTemplate(string $theme = null) : \Template
创建模板对象,预加载已编译模板
| string | $theme | 指定主题名 |
| None found |
| None found |
CheckTemplate(boolean $onlycheck = false, boolean $forcebuild = false) : true
更新模板缓存.
| boolean | $onlycheck | 为真的话,只判断是否需要而不Build |
| boolean | $forcebuild |
or false
| None found |
| None found |
RegBuildModule(string $moduleFileName, string $moduleFunction)
重建模块.
| string | $moduleFileName | 模块名 |
| string | $moduleFunction | 用户函数 |
| None found |
| None found |
AddBuildModule(string $moduleFileName, null $parameters = null)
添加进入Build Ready列表的模块.
| string | $moduleFileName | 模块名 |
| null | $parameters | 模块参数 |
| None found |
DelBuildModule(string $moduleFileName)
删除进入Build Ready列表模块.
| string | $moduleFileName | 模块名 |
| None found |
GetListCustom(string|array $table, array $datainfo, string $sql) : array
查询指定数据结构的sql并返回Base对象列表.
| string|array | $table | 数据表 |
| array | $datainfo | 数据字段 |
| string | $sql | SQL操作语句 |
| None found |
GetListCustomByArray(string|array $table, array $datainfo, array $array) : array<mixed,\Base>
查询ID数据的指定数据结构的sql并返回Base对象列表.
| string|array | $table | 数据表 |
| array | $datainfo | 数据字段 |
| array | $array | ID数组 |
| None found |
GetListType( $type, $sql) : array<mixed,\Base>
已改名GetListType,1.5版中扔掉有歧义的GetList.
| $type | ||
| $sql |
| None found |
GetListOrigin( $sql) : array<mixed,\Base>
GetListOrigin.
| $sql |
| None found |
GetListTypeByArray(string $type, mixed $array) : array<mixed,\Base>
查询ID数据的指定类型的sql并返回指定类型对象列表.
| string | $type | 类型 |
| mixed | $array | ID数组 |
| None found |
GetPostList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null) : array<mixed,\Post>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option |
| None found |
GetPostByArray(array<mixed,mixed> $array) : array<mixed,\Post>|array<mixed,\Base>
通过ID数组获取文章实例.
| array<mixed,mixed> | $array |
Posts
| None found |
GetArticleList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null, mixed $readtags = true) : array<mixed,\Post>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option | |
| mixed | $readtags |
| None found |
GetPageList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null) : array<mixed,\Post>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option |
| None found |
GetCommentList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null) : array<mixed,\Comment>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option |
| None found |
GetMemberList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null) : array<mixed,\Member>|array<mixed,\Base>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option |
| None found |
GetTagList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null) : array<mixed,\Tag>|array<mixed,\Base>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option |
| None found |
GetCategoryList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null) : array<mixed,\Category>|array<mixed,\Base>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option |
| None found |
GetModuleList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null) : array<mixed,\Module>|array<mixed,\Base>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option |
| None found |
GetUploadList(mixed $select = null, mixed $where = null, mixed $order = null, mixed $limit = null, mixed $option = null) : array<mixed,\Upload>|array<mixed,\Base>
| mixed | $select | |
| mixed | $where | |
| mixed | $order | |
| mixed | $limit | |
| mixed | $option |
| None found |
| None found |
GetSomeThing(array<mixed,\Base>|string $object, string $attr, mixed $val, string $className = null) : \Base|null
获取数据通用函数.
| array<mixed,\Base>|string | $object | 缓存对象(string / object) |
| string | $attr | 欲查找的属性 |
| mixed | $val | 要查找内容 |
| string | $className | 对象未找到时,初始化类名 |
| None found |
GetPostByID(integer $id) : \Post|\Base
通过ID获取文章实例.
| integer | $id |
| None found |
GetCategoryByID(integer $id) : \Category|\Base
通过ID获取分类实例.
| integer | $id |
| None found |
GetCategoryByName(string $name) : \Category|\Base
通过分类名获取分类实例.
| string | $name |
| None found |
GetCategoryByAlias(string $name, null $backKey = null) : \Category|\Base
通过分类别名获取分类实例.
| string | $name | |
| null | $backKey |
| None found |
GetCategoryByAliasOrName(string $name) : \Category
与老版本保持兼容函数.
| string | $name |
| None found |
GetModuleByID(integer $id) : \Module|\Base
通过ID获取模块实例.
| integer | $id |
| None found |
GetModuleByFileName(string $fn) : \Module|\Base
通过FileName获取模块实例.
| string | $fn |
| None found |
GetMemberByID(integer $id) : \Member|\Base
通过ID获取用户实例.
| integer | $id |
| None found |
GetMemberByName(string $name) : \Member|\Base
通过用户名获取用户实例(不区分大小写).
| string | $name |
| None found |
GetMemberByNameOrAlias(string $name) : \Member|\Base
通过获取用户名或别名实例(不区分大小写).
| string | $name |
| None found |
GetMemberByEmail(string $email) : \Member
通过邮箱名获取用户实例(不区分大小写).
| string |
| None found |
CheckMemberNameExist( $name) : boolean
检查指定名称的用户是否存在(不区分大小写).
| $name |
| None found |
CheckMemberByNameOrAliasExist( $name) : boolean
检查指定名称或别名的用户是否存在(不区分大小写).
| $name |
| None found |
CheckMemberByEmailExist( $email) : boolean
检查指定邮箱的用户是否存在(不区分大小写).
| None found |
GetCommentByID(integer $id) : \Comment|\Base
通过ID获取评论实例.
| integer | $id |
| None found |
GetUploadByID(integer $id) : \Upload|\Base
通过ID获取附件实例.
| integer | $id |
| None found |
GetTagByAlias(string $name, null $backKey = null) : \Tag|\Base
通过tag名获取tag实例.
| string | $name | |
| null | $backKey |
| None found |
GetTagByAliasOrName(string $name) : \Tag|\Base
通过tag名获取tag实例.
| string | $name |
| None found |
GetTagByID(integer $id) : \Tag|\Base
通过ID获取tag实例.
| integer | $id |
| None found |
LoadTagsByIDString( $s) : array
通过类似'{1}{2}{3}{4}'载入tags.
| $s |
| None found |
LoadTagsByNameString(string $s) : array
通过类似'aaa,bbb,ccc,ddd'载入tags.
| string | $s | 标签名字符串,如'aaa,bbb,ccc,ddd |
| None found |
ConvertTagIDtoString(array $array) : string
通过数组array[111,333,444,555,666]转换成存储串.
| array | $array | 标签ID数组 |
| None found |
GetTopArticle(integer $type) : array
获取全部置顶文章(优先从cache里读数组).
| integer | $type |
| None found |
| None found |
| None found |
GetCSRFToken(string $id = '') : string
获取CSRF Token.
| string | $id | 应用ID,可以保证每个应用获取不同的Token |
| None found |
VerifyCSRFToken(string $token, string $id = '') : boolean
验证CSRF Token.
| string | $token | |
| string | $id | 应用ID,可为每个应用生成一个专属token |
| None found |
ShowValidCode(string $id = '') : boolean
显示验证码
| string | $id | 命名事件 |
| api |
Filter_Plugin_Zbp_ShowValidCode 如该接口未被挂载则显示默认验证图片 |
|---|
CheckValidCode(string $verifyCode, string $id = '') : boolean
比对验证码
| string | $verifyCode | 验证码数值 |
| string | $id | 命名事件 |
| api |
Filter_Plugin_Zbp_CheckValidCode 如该接口未被挂载则比对默认验证码 |
|---|
AddItemToNavbar(string $type, string $id, string $name, string $url)
向导航菜单添加相应条目.
| string | $type | $type=category,tag,page,item |
| string | $id | |
| string | $name | |
| string | $url |
| None found |
| None found |
CheckItemToNavbar(string $type, $id) : boolean
检查条目是否在导航菜单中.
| string | $type | |
| $id |
| None found |
SetHint(string $signal, string $content = '')
设置提示消息并存入Cookie.
| string | $signal | 提示类型(good|bad|tips) |
| string | $content | 提示内容 |
| None found |
| None found |
ShowHint(string $signal, string $content = '')
由提示消息获取HTML.
| string | $signal | 提示类型(good|bad|tips) |
| string | $content | 提示内容 |
| None found |
ShowError(\string/int $errorText, null $file = null, null $line = null) : mixed
显示错误信息.
| \string/int | $errorText | |
| null | $file | |
| null | $line |
| api |
Filter_Plugin_Zbp_ShowError |
|---|
| None found |
| None found |
| None found |
| None found |
| None found |
RegPostType( $typeId, $name, string $urlRule = '', string $template = 'single', string $categoryType = null, string $tagType = null)
注册PostType.
| $typeId | ||
| $name | ||
| string | $urlRule | 默认是取Page类型的Url Rule |
| string | $template | 默认模板名page |
| string | $categoryType | 当前文章类的分类Type |
| string | $tagType | 当前文章类的标签Type |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
| None found |
GetActionDescription( $name) : mixed
获得Action权限注释.
| $name |
| None found |
| None found |
| None found |
Verify_MD5Path(string $name, string $ps_path_hash, object $member = null) : boolean
验证用户登录(MD5加zbp->guid盐后的密码).
| string | $name | 用户名 |
| string | $ps_path_hash | MD5加zbp->guid盐后的密码 |
| object | $member | 返回读取成功的member对象 |
| None found |
GetToken(string $id = '') : string
获取CSRF Token的错误别名.
| string | $id | 应用ID,可以保证每个应用获取不同的Token |
| None found |
ValidToken( $t, $id = '') : boolean
验证CSRF Token的错误别名.
| $t | ||
| $id |
| None found |
| None found |
GetWebToken(string $wt_id = '', integer $day = 1) : string
获取会话WebToken.
| string | $wt_id | |
| integer | $day | 默认1天有效期,1小时为1/24,1分钟为1/(24*60) |
| None found |
ValidWebToken( $wt, $wt_id = '') : boolean
验证会话WebToken.
| $wt | ||
| $wt_id |
| None found |
GetSomeThingByAlias( $object, string $val, string $backAttr = null, string $className = null) : \Base|null
根据别名得到相应数据.
| $object | ||
| string | $val | |
| string | $backAttr | |
| string | $className |
| None found |
GetSomeThingById( $object, string $className, integer|string $id) : \Base|null
根据ID得到相应数据.
| $object | ||
| string | $className | 找不到ID时初始化对象的类名 |
| integer|string | $id | 与此类相关的ID |
| None found |
GetSomeThingByAttr( $object, string $attr, mixed $val) : null
根据属性值得到相应数据.
| $object | ||
| string | $attr | 属性名 |
| mixed | $val | 要查找的值 |
| None found |