session = $session; $this->update(); } /** * Update memento */ public function update() { $session = $this->session; $this->state = $session->getState(); $route = $session->getRoute(); if ($route->valid()) { $this->item = $session->getCurrentAssessmentItemRef(); $this->section = $session->getCurrentAssessmentSection(); } else { $this->item = false; $this->section = false; } } /** * @return int|AssessmentTestSessionState */ public function getState() { return $this->state; } /** * @return false|AssessmentItemRef */ public function getItem() { return $this->item; } /** * @return false|AssessmentSection */ public function getSection() { return $this->section; } /** * @return AssessmentTestSession */ public function getSession() { return $this->session; } }