FeedModel::getUserList PHP Method

getUserList() public method

查看指定用户的分享列表
public getUserList ( array $map, integer $uid, string $app, string $type, integer $limit = 10 ) : array
$map array 查询条件
$uid integer 用户ID
$app string 应用类型
$type string 分享类型
$limit integer 结果集数目,默认为10
return array 指定用户的分享列表数据
    public function getUserList($map, $uid, $app, $type, $limit = 10)
    {
        if (!$uid) {
            $this->error = L('PUBLIC_WRONG_DATA');
            // 获取信息失败
            return false;
        }
        !empty($app) && ($map['app'] = $app);
        if (!empty($type)) {
            if ($type == 'repost') {
                $map['type'] = array('LIKE', '%repost');
            } else {
                $map['type'] = $type;
            }
        }
        //		!empty($type) && $map['type'] = $type;
        if ($map['type'] == 'post') {
            unset($map['type']);
            $map['is_repost'] = 0;
        }
        $map['uid'] = $uid;
        $list = $this->getList($map, $limit);
        return $list;
    }