/** * Does this session exist? * * @param $session_id * * @return bool */ public function Exists($session_id) { if ($this->database->Exists($session_id)) { return true; } return false; }
/** * What we do on construct * * @param $session_id */ public function __construct($session_id) { $this->database = new DatabaseSession(); if ($this->database->Exists($session_id) == false) { return; } /** * Set the ID */ $this->session_id = $session_id; /** * Get session data */ $this->session_data = $this->database->Select($session_id); }