/** * Gets a session * @param array $options * @return \Nimbles\Http\Session */ public static function getSession($options = null) { $session = new Session($options); $session->isStarted(false); $session->setDelegate('session_start', array('\\Nimbles\\Http\\TestCase', 'sessionStart')); $session->setDelegate('session_id', array('\\Nimbles\\Http\\TestCase', 'sessionId')); $session->setDelegate('session_name', array('\\Nimbles\\Http\\TestCase', 'sessionName')); $session->setDelegate('session_regenerate_id', array('\\Nimbles\\Http\\TestCase', 'generateSessionId')); $session->setDelegate('session_destroy', array('\\Nimbles\\Http\\TestCase', 'sessionDestroy')); $session->setDelegate('headers_sent', array('\\Nimbles\\Http\\TestCase', 'isHeadersSent')); $session->setDelegate('setcookie', array('\\Nimbles\\Http\\TestCase', 'setcookie')); $session->setDelegate('setrawcookie', array('\\Nimbles\\Http\\TestCase', 'setrawcookie')); $session->setDelegate('readValue', array('\\Nimbles\\Http\\TestCase', 'readSession')); $session->setDelegate('writeValue', array('\\Nimbles\\Http\\TestCase', 'writeSession')); $session->setDelegate('clearValues', array('\\Nimbles\\Http\\TestCase', 'clearSession')); $session->setDelegate('offsetExists', array('\\Nimbles\\Http\\TestCase', 'sessionKeyExists')); return $session; }