public function GetLogItemsBySess($sess) { $logCollection = new \model\LogCollection(); foreach ($this->logArray as $logItem) { if ($logItem->m_sess == $sess) { $logCollection->addExistingLogItem($logItem); } } return $logCollection; }
public function doLogManager() { if ($this->nav->DoShowWelcome()) { $this->view = new \view\LogWelcomeView(new \view\Navigation()); } if ($this->nav->DoShowInterface()) { $this->view = new \view\LogInterfaceView(new \view\Navigation()); } if ($this->nav->DoShowDetailsOfLogItem()) { $logItem = $this->nav->GetLogItem($this->logCollection); $logCollection = new \model\LogCollection(); $logCollection->addExistingLogItem($logItem); $this->view = new \view\LogView($logCollection, $this->nav, true); } if ($this->nav->DoShowAllIpAddresseThatExistsInSavedLogCollection()) { $this->view = new \view\LogIpListSelectable($this->logCollection, $this->nav); } if ($this->nav->DoShowAllSessionsThatExistsInSavedLogCollection()) { $this->view = new \view\LogSessionListSelectable($this->logCollection, $this->nav); } if ($this->nav->ClentWantsToDigDeeper()) { $logCollection = $this->nav->GetLogItemsBySession($this->logCollection); $this->view = new \view\LogView($logCollection, $this->nav); } try { if ($this->nav->SystemShouldThrowAnException()) { } } catch (\Exception $e) { $this->logItemDal->CreateLogItem(new \model\LogItem($e->getMessage(), true, $e, microtime(true), $e->getTrace(), $this->GetStateOfRequest(), $_SERVER['REMOTE_ADDR'], session_id())); $this->logCollection = $this->logItemDal->ReadLogItemAll(); $tmpLogCollection = new \model\LogCollection(); $tmpLogCollection->addExistingLogItem($this->logCollection->getLastSaved()); return $logView = new \view\LogView($tmpLogCollection, $this->nav); } return $this->view; }