protected function simulateSessionStart(SessionHandler $handler) { $handler->open('dummy', 'test'); $data = $handler->read('example'); $_SESSION = unserialize($data) ?: array(); // Instead of session_decode }
/** * Initialize session * @link http://php.net/manual/en/sessionhandlerinterafce.open.php * @param string $save_path * @param string $session_id * @return bool */ public function open($save_path, $session_id) { return $this->handler->open($save_path, $session_id); }