PHP Class FeedbackModel, thinksns

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

Protected Properties

Свойство Type Description
$fields array 数据模型保护字段
$tableName string 模型数据表名称
$typeModel object 类型模型
$types array 类型名称对应

Méthodes publiques

Méthode 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 更新反馈信息

Méthodes protégées

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

Method Details

_initialize() protected méthode

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

add() public méthode

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

delete() public méthode

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

findDataToPageByType() public méthode

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

selectAddType() protected méthode

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

update() public méthode

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

Property Details

$fields protected_oe property

数据模型保护字段
protected array $fields
Résultat array

$tableName protected_oe property

模型数据表名称
protected string $tableName
Résultat string

$typeModel protected_oe property

类型模型
protected object $typeModel
Résultat object

$types protected_oe property

类型名称对应
protected array $types
Résultat array