private static function _initHandler() { // @todo merge given config to the default one to avoid missing fields $sessCfg = Oops_Server::getConfig()->session; $handlerClass = 'Oops_Session_' . $sessCfg->handler; if (!class_exists($handlerClass)) { $handlerClass = 'Oops_Session_Native'; } self::$session = new Oops_Session_Native($sessCfg); }
public function Check($passed, $keep = false) { Oops_Session::init(); $k = $this->config->storage_key; if (empty($_SESSION[$k])) { return false; } if (($position = array_search($passed, $_SESSION[$k])) !== false) { if (!$keep) { array_splice($_SESSION[$k], $position, 1); } return true; } return false; }
/** * @deprecated Use Oops_Session::init() */ public static function initSession() { require_once 'Oops/Session.php'; Oops_Session::init(); }