PHP Class LogsModel, thinksns

Inheritance: extends Model
Datei anzeigen Open project: medz/thinksns-4 Class Usage Examples

Public Properties

Property Type Description
$keyword 知识配置字段
$option

Protected Properties

Property Type Description
$fields
$tableName

Public Methods

Method Description
action ( string $type ) : object 链式指定知识行为
cleanLogs ( integer $m ) : mix 清除知识数据,删除几个月前的知识信息
dellogs ( integer $id, string $date = '' ) : mix 删除指定的知识记录信息
get ( array $map, integer $limit = 30, string $table = false ) : array 获取指定知识的列表信息
getMenuList ( string $app ) : array 获取指定应用下所有权限节点列表
load ( string $type ) : object 链式指定知识类型
logsArchive ( ) : boolean 重建知识归档,重建后的知识只存在归档表中,主知识表不在有该知识信息
record ( string $content, integer $isAdminLog ) : mix 记录知识

Protected Methods

Method Description
__paseTemplate ( array $_data ) : array 渲染知识模板变量

Private Methods

Method Description
parseKeyWord ( string $content ) 将数值转换为字符串

Method Details

__paseTemplate() protected method

渲染知识模板变量
protected __paseTemplate ( array $_data ) : array
$_data array 知识相关数据
return array 渲染后的知识模板变量

action() public method

链式指定知识行为
public action ( string $type ) : object
$type string 行为字段
return object 知识模型对象

cleanLogs() public method

清除知识数据,删除几个月前的知识信息
public cleanLogs ( integer $m ) : mix
$m integer 月数,删除几个月前的知识信息
return mix 删除失败返回false,删除成功返回1

dellogs() public method

删除指定的知识记录信息
public dellogs ( integer $id, string $date = '' ) : mix
$id integer 知识ID
$date string 时间字段
return mix 删除失败返回false,删除成功返回删除的知识ID

get() public method

获取指定知识的列表信息
public get ( array $map, integer $limit = 30, string $table = false ) : array
$map array 查询条件
$limit integer 结果集数目,默认为30
$table string 指定知识表,默认为系统知识表
return array 指定知识的列表信息

getMenuList() public method

获取指定应用下所有权限节点列表
public getMenuList ( string $app ) : array
$app string 应用名称
return array 指定应用下所有权限节点列表

load() public method

链式指定知识类型
public load ( string $type ) : object
$type string 知识类型,用“_”进行分割
return object 知识模型对象

logsArchive() public method

重建知识归档,重建后的知识只存在归档表中,主知识表不在有该知识信息
public logsArchive ( ) : boolean
return boolean 是否重建成功

record() public method

记录知识
public record ( string $content, integer $isAdminLog ) : mix
$content string 知识内容
$isAdminLog integer 是否是管理员知识,默认为1
return mix 添加失败返回false,添加成功返回知识ID

Property Details

$fields protected_oe property

protected $fields

$keyword public_oe property

知识配置字段
public $keyword

$option public_oe property

public $option

$tableName protected_oe property

protected $tableName