IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • FeedTopic
  • FeedTopicLink
  • Follow

Class Follow

CActiveRecord
Extended by application\core\model\Model
Extended by application\modules\weibo\model\Follow
Namespace: application\modules\weibo\model
Located at system/modules/weibo/model/Follow.php

Methods summary

public static
# model( $className = __CLASS__ )
public
# tableName( )
public boolean
# doFollow( integer $uid, integer $fid )

添加关注 (关注用户)

添加关注 (关注用户)

Parameters

$uid
发起操作的用户ID
$fid
被关注的用户ID或被关注的话题ID

Returns

boolean
是否关注成功

Example

null:参数错误 11:已关注 12:关注成功(且为单向关注) 13:关注成功(且为互粉)


public boolean
# unFollow( integer $uid, integer $fid )

取消关注(关注用户 / 关注话题)

取消关注(关注用户 / 关注话题)

Parameters

$uid
发起操作的用户ID
$fid
被取消关注的用户ID或被取消关注的话题ID

Returns

boolean
是否取消关注成功

Example

00:取消失败 01:取消成功


public integer
# getFollowState( integer $uid, integer $fid )

获取用户uid与用户fid的关注状态,以uid为主

获取用户uid与用户fid的关注状态,以uid为主

Parameters

$uid
用户ID
$fid
用户ID

Returns

integer
用户关注状态,格式为array('following'=>1,'follower'=>1)
public array
# getFollowStateByFids( integer $uid, array $fids )

批量获取用户uid与一群人fids的彼此关注状态

批量获取用户uid与一群人fids的彼此关注状态

Parameters

$uid
用户ID
$fids
用户ID数组

Returns

array
用户uid与一群人fids的彼此关注状态
public array
# getFollowingList( integer $uid, integer $offset = 0, integer $limit = 10 )

获取指定用户的关注列表 分页

获取指定用户的关注列表 分页

Parameters

$uid
用户ID
$offset
页面偏移
$limit
每页条数

Returns

array
指定用户的关注用户
public array
# getFollowingListAll( integer $uid )

获取指定用户的关注列表 不分页

获取指定用户的关注列表 不分页

Parameters

$uid
用户ID

Returns

array
指定用户的关注用户
public array
# getFollowerList( integer $uid, integer $offset = 0, $limit = 10 )

获取指定用户的粉丝列表

获取指定用户的粉丝列表

Parameters

$uid
用户ID
$offset
$limit 结果集数目,默认为10
$limit

Returns

array
指定用户的粉丝列表
public array
# getFollowCount( array $uids )

获取指定用户的关注与粉丝数

获取指定用户的关注与粉丝数

Parameters

$uids
用户ID数组

Returns

array
指定用户的关注与粉丝数
public array
# getBothFollow( integer $uid, integer $secondUid )

根据两个uid获取这两个人互相关注的用户ID

根据两个uid获取这两个人互相关注的用户ID

Parameters

$uid
第一个用户ID
$secondUid
第二个用户ID

Returns

array
互相关注的用户ID数组
public array
# getSecondFollow( integer $uid, integer $secondUid )

获取第二关注的用户列表 ($uid关注的人也关注$secondUid)

获取第二关注的用户列表 ($uid关注的人也关注$secondUid)

Parameters

$uid
当前用户
$secondUid
查找第二关注的用户

Returns

array

Methods inherited from application\core\model\Model

add(), beforeDelete(), create(), deleteByPk(), fetch(), fetchAll(), fetchAllByAttributes(), fetchAllByPk(), fetchAllSortByPk(), fetchByAttributes(), fetchByPk(), fetchCache(), fetchCaches(), getCacheKey(), getIsAllowCache(), getMaxId(), getModelClass(), init(), modify(), remove(), updateAll(), updateByPk()

Properties summary

Properties inherited from application\core\model\Model

$allowCache, $cacheLife

IBOS open source API documentation generated by ApiGen