PHP Class FeedbackModel, thinksns

Author: Andreas (lemon-head), based on work by Michael Dettbarn (bw: lupochen)
Inheritance: extends RoxModelBase
Datei anzeigen Open project: medz/thinksns-4 Class Usage Examples

Protected Properties

Property Type Description
$fields array 数据模型保护字段
$tableName string 模型数据表名称
$typeModel object 类型模型
$types array 类型名称对应

Public Methods

Method Description
add ( integer $type, string $content, integer $uid ) : boolean 添加反馈
delete ( $fid ) : boolean 根据ID删除反馈信息
findDataToPageByType ( integer $type, integer $number = 10, boolean $asc = false ) : array 更具type类型获取分页数据
update ( $fid, $content ) : boolean 更新反馈信息

Protected Methods

Method Description
_initialize ( ) 初始化模型
selectAddType ( $type ) : integer 以查询的方式添加类型

Method Details

_initialize() protected method

初始化模型
Author: Medz Seven ([email protected])
protected _initialize ( )

add() public method

添加反馈
Author: Medz Seven ([email protected])
public add ( integer $type, string $content, integer $uid ) : boolean
$type integer 反馈的类型
$content string 反馈的内容
$uid integer 反馈的UID,默认为0,兼容某些地方,可以匿名反馈
return boolean

delete() public method

根据ID删除反馈信息
Author: Medz Seven ([email protected])
public delete ( $fid ) : boolean
return boolean

findDataToPageByType() public method

更具type类型获取分页数据
Author: Medz Seven ([email protected])
public findDataToPageByType ( integer $type, integer $number = 10, boolean $asc = false ) : array
$type integer 类型
$number integer 每页显示的数量
$asc boolean 是否按照时间正序排列,默认为false,以时间倒叙
return array

selectAddType() protected method

以查询的方式添加类型
Author: Medz Seven ([email protected])
protected selectAddType ( $type ) : integer
return integer 类型ID

update() public method

更新反馈信息
Author: Medz Seven ([email protected])
public update ( $fid, $content ) : boolean
return boolean

Property Details

$fields protected_oe property

数据模型保护字段
protected array $fields
return array

$tableName protected_oe property

模型数据表名称
protected string $tableName
return string

$typeModel protected_oe property

类型模型
protected object $typeModel
return object

$types protected_oe property

类型名称对应
protected array $types
return array