startTime = time(); $this->expectedDuration = 0; $this->title = ""; $this->description = ""; $this->available = false; $this->working = false; $this->template = ""; $this->streak = array(); } public function initialLoad(): void { } public function getCurrentDuration(): int { return time() - $this->startTime; } public function getRemainingDuration(): int { return $this->expectedDuration - $this->getCurrentDuration(); } public function getPublicData(): array { return array( "startTime" => $this->startTime, "expectedDuration" => $this->expectedDuration, "title" => $this->title, "description" => $this->description, "available" => $this->available, "working" => $this->working, "currentDuration" => $this->getCurrentDuration(), "remainingDuration" => $this->getRemainingDuration(), "streak" => $this->streak, ); } }