public static function run() { self::load_environment(); Logger::info("Dispatcher run!"); Session::initialize(); self::handle(); }
<?php /* * Set up the session handling environment. */ $GLOBALS['pie']['log'] = 'Session Handling'; if (!file_exists("{$lib}/class/session.php")) { bye("The session handler library could not be found."); } include_once "{$lib}/class/session.php"; $session = new Session(); if (!$session->initialize()) { bye("The session sub system could not be initialized."); }
self::$team = self::$person->getTeam(); if (self::$team) { self::$defaultPosition = POSITION_PLAYER; } if (self::$person->isAdmin()) { self::$defaultPosition = POSITION_ADMIN; } } } } /** * Does a one-time fetch of the SUNetID from the WebAuth system. * Override this for handy testing purposes! */ private static function getWebAuthUserID() { $id = idx($_ENV, 'WEBAUTH_USER'); // switch to another name for multi-browser demos, or testing purposes // if (in_array($id, array('mattbush')) && // self::$course_names['beta']) { // $agent = $_SERVER['HTTP_USER_AGENT']; // $ie = strpos($agent, 'MSIE') !== false; // $safari = strpos($agent, 'Safari') !== false; // $chrome = strpos($agent, 'Chrome') !== false; // if ($ie || ($safari && !$chrome)) $id .= '__2'; // } return $id; } } Session::initialize();
public function testSessionIsCreatedWithSuccess() { Session::initialize(); $session = Session::getInstance(); $this->assertNotNull($session); }
| 'walk_location' => 'Abergele') | )); | }); | </code> */ /* |-------------------------------------------------------------------------- | Register Session Driver |-------------------------------------------------------------------------- | | Register the driver for sessions | Other drivers can be used if registered with the factory class | */ $session = new Session(); Registry::set("session", $session->initialize()); /* |-------------------------------------------------------------------------- | Register Cache Driver |-------------------------------------------------------------------------- | | Register the driver for caching | Other drivers can be used if registered with the factory class | */ $cache = new Cache(); Registry::set("cache", $cache->initialize()); /* |-------------------------------------------------------------------------- | Register Router |--------------------------------------------------------------------------