Ejemplo n.º 1
0
 /**
  * Setting dependencies which will be used one this page
  */
 private function set_dependencies()
 {
     // Setting the service object.
     $this->service = new YMBESEO_GSC_Service(YMBESEO_GSC_Settings::get_profile());
     // Setting the platform.
     $this->platform = YMBESEO_GSC_Mapper::get_current_platform('tab');
     // Loading the issue counter.
     $issue_count = new YMBESEO_GSC_Count($this->service);
     $issue_count->fetch_counts();
     // Loading the category filters.
     $this->category_filter = new YMBESEO_GSC_Category_Filters($issue_count->get_platform_counts($this->platform));
     // Setting the current category.
     $this->category = $this->category_filter->get_category();
     // Listing the issues.
     $issue_count->list_issues($this->platform, $this->category);
     // Fetching the issues.
     $this->issue_fetch = new YMBESEO_GSC_Issues($this->platform, $this->category, $issue_count->get_issues());
 }
Ejemplo n.º 2
0
 /**
  * Getting the counts for current platform - category combination and update the score of it.
  *
  * @param YMBESEO_GSC_Service $service
  */
 private function update_issue_count(YMBESEO_GSC_Service $service)
 {
     $counts = new YMBESEO_GSC_Count($service);
     // Get the issues.
     $total_issues = $counts->get_issue_count($this->platform, $this->category);
     // Lower the current count with 1.
     $total_issues = $total_issues - 1;
     // And update the count.
     $counts->update_issue_count($this->platform, $this->category, $total_issues);
 }