PHP Class AtmeModel, thinksns

Author: jason ([email protected])
Inheritance: extends Model
ファイルを表示 Open project: medz/thinksns-4

Protected Properties

Property Type Description
$fields
$tableNmae

Public Methods

Method Description
addAtme ( string $content, integer $row_id, array $extra_uids = null, array $less_uids = null ) : integer 添加@Me数据
deleteAtme ( string $content, integer $row_id, array $extra_uids = null ) : boolean 删除@Me数据
getAtmeList ( array $map = null, string $order = 'atme_id DESC', integer $limit = 5 ) : array 获取@Me列表 - 分页型
getTab ( array $map ) : array 获取动态的种类,用于动态的Tab
getUids ( string $content, array $extra_uids = null, integer $row_id, array $less_uids = null ) : array 获取@内容中的@用户
mentions ( $mid, $since_id, $max_id, $limit = 20, $page = 1, $table = null ) 所有的@信息
mentions_feed ( $mid, $since_id, $max_id, $limit = 20, $page = 1 ) 动态的@信息
setAppName ( string $app ) : object 设置所属应用
setAppTable ( string $app_table ) : object 设置相关内容所存储的资源表
setAtField ( string $field ) : object 设置@的资源字段
setAtRegex ( string $regex ) : object 设置@的相关正则规则
updateRecentAt ( string $content ) 更新最近@的人
updateRecentAtForApi ( string $content, $row_id ) 更新最近@的人

Private Methods

Method Description
_deleteAtme ( array $uids, integer $row_id ) : boolean 删除@Me信息操作
_saveAtme ( array $uids, integer $row_id ) : integer 添加@Me信息操作

Method Details

addAtme() public method

添加@Me数据
public addAtme ( string $content, integer $row_id, array $extra_uids = null, array $less_uids = null ) : integer
$content string @Me的相关内容
$row_id integer 资源ID
$extra_uids array 额外@用户ID
$less_uids array 去除@用户ID
return integer 添加成功后的@ID

deleteAtme() public method

删除@Me数据
public deleteAtme ( string $content, integer $row_id, array $extra_uids = null ) : boolean
$content string @Me的相关内容
$row_id integer 资源ID
$extra_uids array 额外@用户UID
return boolean 是否删除成功

getAtmeList() public method

获取@Me列表 - 分页型
public getAtmeList ( array $map = null, string $order = 'atme_id DESC', integer $limit = 5 ) : array
$map array 查询条件
$order string 排序条件,默认为atme_id DESC
$limit integer 结果集显示个数,默认为20
return array @Me列表信息

getTab() public method

获取动态的种类,用于动态的Tab
public getTab ( array $map ) : array
$map array 查询条件
return array 评论种类与其资源数目

getUids() public method

获取@内容中的@用户
public getUids ( string $content, array $extra_uids = null, integer $row_id, array $less_uids = null ) : array
$content string @Me的相关内容
$extra_uids array 额外@用户UID
$row_id integer 资源ID
$less_uids array 去除@用户ID
return array 用户UID数组

mentions() public method

所有的@信息
public mentions ( $mid, $since_id, $max_id, $limit = 20, $page = 1, $table = null )

mentions_feed() public method

动态的@信息
public mentions_feed ( $mid, $since_id, $max_id, $limit = 20, $page = 1 )

setAppName() public method

设置所属应用
public setAppName ( string $app ) : object
$app string 应用名称
return object @对象

setAppTable() public method

设置相关内容所存储的资源表
public setAppTable ( string $app_table ) : object
$app_table string 数据表名
return object @对象

setAtField() public method

设置@的资源字段
public setAtField ( string $field ) : object
$field string @的资源字段
return object @对象

setAtRegex() public method

设置@的相关正则规则
public setAtRegex ( string $regex ) : object
$regex string 正则规则
return object @对象

updateRecentAt() public method

更新最近@的人
public updateRecentAt ( string $content )
$content string 原创分享内容

updateRecentAtForApi() public method

更新最近@的人
public updateRecentAtForApi ( string $content, $row_id )
$content string 原创分享内容

Property Details

$fields protected_oe property

protected $fields

$tableNmae protected_oe property

protected $tableNmae