本文整理匯總了PHP中Relation::relation_stats方法的典型用法代碼示例。如果您正苦於以下問題:PHP Relation::relation_stats方法的具體用法?PHP Relation::relation_stats怎麽用?PHP Relation::relation_stats使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Relation
的用法示例。
在下文中一共展示了Relation::relation_stats方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: render
function render()
{
$param['network_id'] = PA::$network_info->network_id;
$res = Network::get_members($param);
$links['registered_users'] = count($res['users_data']);
$this->email_domain_array = $this->get_email_by_domain($res['users_data']);
$this->blog_post = Content::load_content_id_array(0, NULL, TRUE, 'ALL', 'created', 'DESC');
$image_array = Image::load_images();
$this->images = count($image_array);
$this->profile_views = User::get_profile_view_stats('profile_visitor_count');
$this->profile_visits_by_user = User::get_profile_view_stats('profile_visited_count');
$relationship_stats = array();
$maximum_relation = 0;
$minimum_relation = 0;
$average_relation = 0;
$relationship_stats = Relation::relation_stats();
if (count($relationship_stats) > 0) {
$maximum_relation = max($relationship_stats);
$minimum_relation = min($relationship_stats);
$average_relation = array_sum($relationship_stats) / count($relationship_stats);
}
$this->relationship_stats = array('min' => $minimum_relation, 'max' => $maximum_relation, 'avg' => $average_relation);
$this->inner_HTML = $this->generate_inner_html($links);
$content = parent::render();
return $content;
}