PHP Class WeibaModel, thinksns

Author: jason ([email protected])
Inheritance: extends Model
显示文件 Open project: medz/thinksns-4

Protected Properties

Property Type Description
$error
$fields
$tableName

Public Methods

Method Description
doFollowWeiba ( $uid, $weiba_id ) : integer 关注微吧
getFollowStateByWeibaid ( $uid, $weiba_id ) : boolean 判断是否关注某个微吧
getFollowStateByWeibaids ( $uid, $weiba_ids ) : [type] 批量获取微吧关注状态
getHashWeiba ( string $k = 'weiba_id', string $v = 'weiba_name' ) : array 获取微吧的Hash数组
getLastError ( )
getPostList ( integer $limit = 20, array $map = [] ) : array 获取帖子列表,后台可以根据条件查询
getWeibaById ( integer $weiba_id ) : array 根据微吧ID获取微吧信息
getWeibaList ( integer $limit = 20, array $map = [] ) : array 获取微吧列表,后台可以根据条件查询
getWeibaName ( $weiba_ids ) * 获取微吧名称
get_posts_forapi ( $limit = 20, $page = 1, $weiba_id = null ) : array 获取帖子列表
get_weibas_forapi ( $since_id, $max_id, $limit = 20, $page = 1, $uid ) : array 获取微吧列表
interestingWeiba ( $uid, $pagesize = 4 ) 个人感兴趣的群组
myWeibaForApi ( $limit, $page, $uid, $type ) : array 获取我的帖子
searchPostForApi ( $keyword, $limit, $page ) : array 搜索帖子
searchWeibaForApi ( $keyword, $limit, $page, $uid ) : array 搜索微吧
setNewcount ( $weiba_id, $num = 1 )
unFollowWeiba ( $uid, $weiba_id ) : integer 取消关注微吧

Private Methods

Method Description
_formatFollowState ( integer $uid, $weiba_ids, array $follow_data ) : array 格式化,用户的关注数据

Method Details

doFollowWeiba() public method

关注微吧
public doFollowWeiba ( $uid, $weiba_id ) : integer
return integer 新添加的数据ID

getFollowStateByWeibaid() public method

判断是否关注某个微吧
public getFollowStateByWeibaid ( $uid, $weiba_id ) : boolean
return boolean 是否已关注

getFollowStateByWeibaids() public method

批量获取微吧关注状态
public getFollowStateByWeibaids ( $uid, $weiba_ids ) : [type]
return [type]

getHashWeiba() public method

获取微吧的Hash数组
public getHashWeiba ( string $k = 'weiba_id', string $v = 'weiba_name' ) : array
$k string Hash数组的Key值字段
$v string Hash数组的Value值字段
return array 用户组的Hash数组

getLastError() public method

public getLastError ( )

getPostList() public method

获取帖子列表,后台可以根据条件查询
public getPostList ( integer $limit = 20, array $map = [] ) : array
$limit integer 结果集数目,默认为20
$map array 查询条件
return array 微吧列表信息

getWeibaById() public method

根据微吧ID获取微吧信息
public getWeibaById ( integer $weiba_id ) : array
$weiba_id integer 微吧ID
return array 微吧信息

getWeibaList() public method

获取微吧列表,后台可以根据条件查询
public getWeibaList ( integer $limit = 20, array $map = [] ) : array
$limit integer 结果集数目,默认为20
$map array 查询条件
return array 微吧列表信息

getWeibaName() public method

* 获取微吧名称
public getWeibaName ( $weiba_ids )

get_posts_forapi() public method

获取帖子列表
public get_posts_forapi ( $limit = 20, $page = 1, $weiba_id = null ) : array
return array 帖子列表

get_weibas_forapi() public method

获取微吧列表
public get_weibas_forapi ( $since_id, $max_id, $limit = 20, $page = 1, $uid ) : array
return array 微吧列表

interestingWeiba() public method

个人感兴趣的群组
public interestingWeiba ( $uid, $pagesize = 4 )

myWeibaForApi() public method

获取我的帖子
public myWeibaForApi ( $limit, $page, $uid, $type ) : array
return array 帖子列表

searchPostForApi() public method

搜索帖子
public searchPostForApi ( $keyword, $limit, $page ) : array
return array 帖子列表

searchWeibaForApi() public method

搜索微吧
public searchWeibaForApi ( $keyword, $limit, $page, $uid ) : array
return array 微吧列表

setNewcount() public method

public setNewcount ( $weiba_id, $num = 1 )

unFollowWeiba() public method

取消关注微吧
public unFollowWeiba ( $uid, $weiba_id ) : integer
return integer 新添加的数据ID

Property Details

$error protected_oe property

protected $error

$fields protected_oe property

protected $fields

$tableName protected_oe property

protected $tableName