V0 : initial import

This commit is contained in:
2026-03-09 07:12:13 +01:00
commit b86ebf9ae4
7810 changed files with 1274400 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
<?php
include_once '../objects/stats_user_in_session_row.php';
class UserGlobalStats
{
public int $nbSessions = 0;
public float $totalDuration = 0.0;
public string $firstSession = "";
public string $lastSession = "";
public UserStatsInSessionRow $totals;
public $sessionDebriefRows = array();
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public function __construct ()
{
$this->totals = new UserStatsInSessionRow();
$this->sessionDebriefRows = array();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public function setSessionTotals (array $row)
{
$this->nbSessions = (int)$row['NbSessions'];
$this->totalDuration = (float)$row['TotalDuration'];
$this->firstSession = $row['MinDate'];
$this->lastSession = $row['MaxDate'];
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public function toArray () : array
{
return array (
"nbSessions" => (int)$this->nbSessions,
"totalDuration" => (float)$this->totalDuration ?? 0.0,
"firstSessionAsString" => $this->firstSession ?? "",
"lastSessionAsString" => $this->lastSession ?? "",
"totals" => $this->totals->toArray(),
"sessionDebriefRows" => $this->sessionDebriefRows
);
}
}
?>