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

  • Atme
  • Comment
  • Feed
  • FeedData
  • FeedDigg
  • Message
  • MessageContent
  • MessageList
  • MessageUser
  • Notify
  • NotifyEmail
  • NotifyMessage
  • NotifySms
  • UserData

Class Feed

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

Methods summary

public static
# model( $className = __CLASS__ )
public
# tableName( )
public array
# getRecentFeeds( integer $num = 4 )

获取最近的几条微博

获取最近的几条微博

Parameters

$num
要获取的条数

Returns

array
微博数据
public array
# getList( array $map, integer $limit = 10, integer $offset = 0, string $order = null )

获取微博列表

获取微博列表

Parameters

$map
查询条件
$limit
结果集数目,默认为10
$offset
记录偏移量,默认为0 (即当前页数)
$order
排序字段

Returns

array
微博列表数据
public array
# getFollowingFeed( string $where = '', integer $limit = 10, integer $offset = 0, integer $uid = '' )

获取指定用户所关注人的所有微博,默认为当前登录用户

获取指定用户所关注人的所有微博,默认为当前登录用户

Parameters

$where
查询条件
$limit
结果集数目,默认为10
$offset
$uid 指定用户ID,默认为空
$uid
$fgid 关组组ID,默认为空

Returns

array
指定用户所关注人的所有微博,默认为当前登录用户
public integer
# countFollowingFeed( string $where = '', integer $uid = '' )

统计指定用户所关注人的所有微博微博数,默认为当前登录用户

统计指定用户所关注人的所有微博微博数,默认为当前登录用户

Parameters

$where
查询条件
$uid
指定用户ID,默认为空

Returns

integer
public mixed
# get( integer $feedId )

获取指定动态的信息

获取指定动态的信息

Parameters

$feedId
$feed_id 动态ID

Returns

mixed
获取失败返回false,成功返回动态信息
public array
# getFeeds( array $feedIds )

获取给定动态ID的动态信息

获取给定动态ID的动态信息

Parameters

$feedIds
动态ID数组

Returns

array
给定动态ID的动态信息
public mixed
# put( integer $uid, string $module = 'weibo', string $type = '', array $data = array(), integer $rowid = 0, string $table = 'feed', array $extUid = null, array $lessUids = null, boolean $isAtMe = true, integer $isRepost = 0 , string $url,…, string $detail,… )

添加动态

添加动态

Parameters

$uid
操作用户ID
$module
动态模块,默认为weibo
$type
动态类型
$data
动态相关数据
$rowid
应用资源ID,默认为0
$table
资源表名,默认为feed
$extUid
额外用户ID,默认为null
$lessUids
去除的用户ID,默认为null
$isAtMe
是否为进行发送,默认为true
$isRepost
是否为转发
$url,…
消息来源地址
$detail,…
消息来源描述说明

Returns

mixed
添加失败返回false,成功返回新的微博ID
public array
# formatFeedContent( string $content, string $weiboNums = 0 )

截取微博内容,将微博中的URL替换成{ts_urlX}进行字符数目统计

截取微博内容,将微博中的URL替换成{ts_urlX}进行字符数目统计

Parameters

$content
微博内容
$weiboNums
微博截取数目,默认为0

Returns

array
格式化后的微博内容,body与content
public array
# doEditFeed( integer $feedid, string $type, string $uid = null )

微博操作,彻底删除、假删除、回复

微博操作,彻底删除、假删除、回复

Parameters

$feedid
$feed_id 微博ID
$type
微博操作类型,deleteFeed:彻底删除,delFeed:假删除,feedRecover:恢复
$uid
删除微博的用户ID(区别超级管理员)

Returns

array
微博操作后的结果信息数组
public array
# getFeedInfo( integer $id, boolean $forApi = false )

获取指定动态的信息,用于资源模型输出

获取指定动态的信息,用于资源模型输出

Parameters

$id
微博ID
$forApi
是否提供API数据,默认为false

Returns

array
指定微博数据
public
# cleanCache( array $feedIds = array(), integer $uid = '' )

清除指定用户指定动态的列表缓存

清除指定用户指定动态的列表缓存

Parameters

$feedIds
动态ID数组,默认为空
$uid
用户ID,默认为空
public integer
# countSearchFeeds( string $key, string $feedType = null, integer $sTime = 0, integer $eTime = 0 )

统计要查询的feed数量

统计要查询的feed数量

Parameters

$key
关键字
$feedType
$type 微博类型,post、repost、postimage
$sTime
开始时间戳
$eTime
结束时间戳

Returns

integer
public integer
# countSearchFollowing( string $key, integer $loadId )

统计查询的关注微博数

统计查询的关注微博数

Parameters

$key
关键字
$loadId
载入微博ID,从此微博ID开始搜索

Returns

integer
public integer
# countSearchAll( string $key, integer $loadId, string $feedtype = '', integer $uid = 0 )

统计查询的所有微博数

统计查询的所有微博数

Parameters

$key
关键字
$loadId
载入微博ID,从此微博ID开始搜索
$feedtype
微博类型
$uid

Returns

integer
public string
# countSearchMovement( string $key, integer $loadId, string $feedtype = '', integer $uid = 0 )

统计查询的动态微博数

统计查询的动态微博数

Parameters

$key
关键字
$loadId
载入微博ID,从此微博ID开始搜索
$feedtype
微博类型
$uid

Returns

string
public array
# searchFeed( string $key, string $type, integer $loadId, integer $limit, integer $offset, string $feedtype = '', $uid = 0 )

搜索微博

搜索微博

Parameters

$key
关键字
$type
搜索类型,following、all、movement
$loadId
载入微博ID,从此微博ID开始搜索
$limit
结果集数目
$offset
页面偏移
$feedtype
微博类型
$uid

Returns

array
搜索后的微博数据
public array
# searchFeeds( string $key, string $feedType = null, integer $limit = 10, integer $offset = 0, integer $sTime = 0, integer $eTime = 0 )

数据库搜索微博

数据库搜索微博

Parameters

$key
关键字
$feedType
微博类型,post、repost、postimage
$limit
结果集数目
$offset
偏移量
$sTime
开始时间戳
$eTime
结束时间戳

Returns

array
搜索后的微博数据
public array
# shareFeed( array $data, string $from = 'share', array $lessUids = null )

分享到微博

分享到微博

Parameters

$data
分享的相关数据
$from
是否发@给资源作者,默认为share
$lessUids
去掉@用户,默认为null

Returns

array
分享操作后,相关反馈信息数据

Example

需要传入的$data值 sid:转发的微博/资源ID app_name:app名称 content:转发时的内容信息,有时候会有某些标题的资源 body:转发时,自定义写入的内容 type:微博类型 comment:是否给原作者评论


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