function StatisticsViewsResult::__construct

Same name in other branches
  1. 8.9.x core/modules/statistics/src/StatisticsViewsResult.php \Drupal\statistics\StatisticsViewsResult::__construct()
  2. 10 core/modules/statistics/src/StatisticsViewsResult.php \Drupal\statistics\StatisticsViewsResult::__construct()
  3. 11.x core/modules/statistics/src/StatisticsViewsResult.php \Drupal\statistics\StatisticsViewsResult::__construct()

File

core/modules/statistics/src/StatisticsViewsResult.php, line 25

Class

StatisticsViewsResult
Value object for passing statistic results.

Namespace

Drupal\statistics

Code

public function __construct($total_count, $day_count, $timestamp) {
    $this->totalCount = (int) $total_count;
    $this->dayCount = (int) $day_count;
    $this->timestamp = (int) $timestamp;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.