PHP Класс AtmeModel, thinksns

Автор: jason ([email protected])
Наследование: extends Model
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$fields
$tableNmae

Открытые методы

Метод Описание
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 ) 更新最近@的人

Приватные методы

Метод Описание
_deleteAtme ( array $uids, integer $row_id ) : boolean 删除@Me信息操作
_saveAtme ( array $uids, integer $row_id ) : integer 添加@Me信息操作

Описание методов

addAtme() публичный Метод

添加@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
Результат integer 添加成功后的@ID

deleteAtme() публичный Метод

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

getAtmeList() публичный Метод

获取@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
Результат array @Me列表信息

getTab() публичный Метод

获取动态的种类,用于动态的Tab
public getTab ( array $map ) : array
$map array 查询条件
Результат array 评论种类与其资源数目

getUids() публичный Метод

获取@内容中的@用户
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
Результат array 用户UID数组

mentions() публичный Метод

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

mentions_feed() публичный Метод

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

setAppName() публичный Метод

设置所属应用
public setAppName ( string $app ) : object
$app string 应用名称
Результат object @对象

setAppTable() публичный Метод

设置相关内容所存储的资源表
public setAppTable ( string $app_table ) : object
$app_table string 数据表名
Результат object @对象

setAtField() публичный Метод

设置@的资源字段
public setAtField ( string $field ) : object
$field string @的资源字段
Результат object @对象

setAtRegex() публичный Метод

设置@的相关正则规则
public setAtRegex ( string $regex ) : object
$regex string 正则规则
Результат object @对象

updateRecentAt() публичный Метод

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

updateRecentAtForApi() публичный Метод

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

Описание свойств

$fields защищенное свойство

protected $fields

$tableNmae защищенное свойство

protected $tableNmae