/** * @return CL_Session */ public static function get_instance() { if (self::$instance === NULL) { self::$instance = new CL_Session(); } return self::$instance; }
public static function redirectWhenNotSignedIn() { $session = CL_Session::get_instance(); $id = $session->get('signedId'); if ($id === FALSE) { location('/user/login'); exit; } }
public function do_logout() { CL_Session::get_instance()->remove('signedId'); location('/user/login'); }
protected function message($referer) { $this->session->set('referer', $referer); $this->location('/message'); }