Example #1
0
 /**
  * Get details by directory
  *
  * @param       $user_id
  * @param       $profile_id
  * @param       $directory_id
  * @param array $options
  *
  * @return array
  */
 public function details($user_id, $profile_id, $directory_id, $options = array())
 {
     $review = new self();
     $rank_details = $review->rank_details($user_id, $profile_id, $directory_id, $options);
     $review = new self();
     $review_limit = 3;
     $latest_reviews = $review->get_latest($user_id, $profile_id, $directory_id, array_merge($options, array('limit' => $review_limit)));
     $review = new self();
     $rank = $review->rank($user_id, $profile_id, $directory_id, $options);
     /*$review = new self();
       $monthly_trending = $review->monthly_trending($user_id, $directory_id, $options);*/
     $review = new self();
     $count = $review->period_count($user_id, $profile_id, $directory_id, $options);
     $review = new self();
     $start_date = isset($options['date_from']) ? $options['date_from'] : null;
     $last_count = $review->last_period_count($user_id, $profile_id, $directory_id, $start_date);
     return array('rank_details' => $rank_details, 'latest_reviews' => $latest_reviews, 'rank' => round($rank, 1), 'count' => $count);
 }