本文整理汇总了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;
}