本文整理汇总了PHP中Relationship::user_friends方法的典型用法代码示例。如果您正苦于以下问题:PHP Relationship::user_friends方法的具体用法?PHP Relationship::user_friends怎么用?PHP Relationship::user_friends使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Relationship
的用法示例。
在下文中一共展示了Relationship::user_friends方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: network_friends
public function network_friends($uid, $startresults = 0, $totalresults = 20, $orderby = "friend", $orderdirection = "DESC")
{
$friendslist = array();
$friendslist = Relationship::user_friends($uid, 0, 5000, $orderby, $orderdirection);
$friendscompact = implode(",", $friendslist);
if (strlen($friendscompact) < 1) {
$friendscompact = -2;
}
$friendsoffriends = Relationship::user_friends($friendscompact, $startresults, $totalresults, $orderby, $orderdirection, $friendscompact);
$fof = $friendsoffriends;
//$friendcount=count($friendslist);
//$fof=array_merge($friendslist,$friendsoffriends);
//$fof=array_diff($friendsoffriends,$friendslist);
//$totrows=profile::get_totalrows();
//profile::set_totalrows($friendcount+$totrows);
//print_r($fof);
return $fof;
}
示例2: friends
public function friends($uid, $page = 0, $resultsperpage = 20, $orderby = 'friend', $orderdirection = 'DESC')
{
$resultstart = $page * $resultsperpage;
$friendslist = array();
$friendslist = Relationship::user_friends($uid, $resultstart, $resultsperpage, $orderby, $orderdirection);
//print_r($friendslist); die;
$friendsdata = $this->get_userinfo($friendslist, $orderby);
if ($friendslist[0] < 1) {
return;
}
foreach ($friendsdata as $random => $data) {
$frienddisplay[$random] = $data;
$frienddisplay[$random]['searchn'] = $this->get_searchnail($frienddisplay[$random]['id']);
$frienddisplay[$random]['thumb'] = $this->get_thumbnail($frienddisplay[$random]['id']);
}
//print_r($frienddisplay);
return $frienddisplay;
}