Destroys any previous session and starts a new one
Hopefully

@return void
962901
final public function restart()
    {

        $id = $this->getId();

        $this->destroy($id);
        $this->create();
        $this->gc();
    }
632270
public function renew()
    {
        if (!$this->_hasSession() || $this->_isCLI) {
            return;
        }

        $this->start();
        $params = session_get_cookie_params();
        setcookie(
            session_name(),
            '',
            time() - 42000,
            $params['path'],
            $params['domain'],
            $params['secure'],
            $params['httponly']
        );

        if (session_id()) {
            session_regenerate_id(true);
        }
    }
1320889
protected function startSession()
    {
        if (@session_status() === \PHP_SESSION_ACTIVE) {
            throw new SessionNotStartedException('Session started already!');
        }

        if (ini_get('session.use_cookies') && headers_sent($file, $line)) {
            throw new SessionNotStartedException(sprintf('Unable to start session, headers already sent by "%s" at line %d.', $file, $line));
        }

        $this->setSessionConfig();

        /*
         | We will start session, if fails
         | we will throw exception to user
         */
        if (!session_start()) {
            throw new SessionNotStartedException('Unable to start session');
        }
    }
805265
public static function destroy()
    {
        if (\session_status() !== PHP_SESSION_ACTIVE) {
            return false;
        }
        foreach (\array_keys($_SESSION) as $key) {
            unset($_SESSION[$key]);
        }
        self::$cfgStatic['id'] = null;
        $success = \session_destroy();
        if (!$success) {
            return false;
        }
        /*
            Clear cookie so new session not automatically started on next page load
            If strict mode is enabled... this isn't exactly necessary...  a new id will be used..
            however, we may not want to start a new session
        */
        \setcookie(
            self::$cfgStatic['name'],
            '',
            \time()-60*60*24,
            self::$cfgStatic['cookiePath'],
            self::$cfgStatic['cookieDomain'],
            self::$cfgStatic['cookieSecure'],
            self::$cfgStatic['cookieHttponly']
        );
        return $success;
    }
913485
public static function DestroyAll () {
		session_destroy();
		$_SESSION = NULL;
		static::$started = FALSE;
		$response = & \MvcCore\Application::GetInstance()->GetResponse();
		if (!$response->IsSent()) {
			$params = (object) session_get_cookie_params();
			$response->DeleteCookie(
				session_name(),
				$params->path,
				$params->domain,
				$params->secure
			);
		}
	}
1048833
public static function Logout(){
            $oThis = self::CreateInstanceIfNotExists();

            if($oThis->bStarted){
                session_unset();
                unset($_SESSION[$oThis->sName]["authentication"]);
                unset($oThis->aAuth);
            }
        }
982555
public function destroy()
    {
        if ($this->instance instanceof \Phavour\Session\Storage) {
            $this->instance->destroy();
        }
        $this->instance = null;
    }
281064
protected function sessionRestore()
	{
		if (isset($_SESSION[get_class($this)][$this->id]))
		{
			$this->unpackData($_SESSION[get_class($this)][$this->id]);
			unset($_SESSION[get_class($this)][$this->id]);
		}
	}
837880
protected function start()
	{
		// Start session if not started
		if ($this->state == 'restart')
		{
			session_id($this->createId());
		}
		else
		{
			$session_name = session_name();

			if (!\Request::getVar($session_name, false, 'COOKIE'))
			{
				if ($id = \Request::getVar($session_name))
				{
					session_id($id);
					setcookie($session_name, '', time() - 3600);
				}
				else
				{
					session_id($this->createId());
				}
			}
		}

		session_cache_limiter('none');
		session_start();

		// Regenerate session id if passed a session id that no longer exists
		if ($_SESSION === array())
		{
			session_destroy();
			session_id($this->createId());
			session_start();
		}

		return true;
	}
1052325
public function destroy()
    {
        parent::destroy();

     Logger::get()->debug('Destroying user ' . $this->id);
        // If this user is the one stored in the session, destroy that too.
        if (!empty($_SESSION) && ($_SESSION['current_user'] == $this)) {
            unset($_SESSION['current_user']);
        }
    }
1283370
protected function stopSession()
	{
		if ( $this->_session === null ) {
			return;
		}

		$this->_session->stop();
		$this->_session = null;
	}
425979
public function destroy()
    {
        // empty
        $_SESSION = array();

        // clear cookies from agent
        $signature = ($this->_name) . 'Signature';
            setcookie(
        $this->_name,
                '',
                time() - 42000,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );
            setcookie(
        $signature,
                '',
                time() - 42000,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );

        /**
         * Clear out of global scope, since setcookie requires buffer flush
         * to update global <_COOKIE> array.
         */
            unset($_COOKIE[$this->_name]);
            unset($_COOKIE[$signature]);

        // destroy
            session_destroy();
    }
1227171
public static function terminate() {
		if (! self::isStarted ())
			return;
		self::start ();
		$_SESSION = array ();

		if (\ini_get ( "session.use_cookies" )) {
			$params = \session_get_cookie_params ();
			\setcookie ( \session_name (), '', \time () - 42000, $params ["path"], $params ["domain"], $params ["secure"], $params ["httponly"] );
		}
		\session_destroy ();
	}
686155
public function destroy()
    {
        // Erase the id on the client side
        if ($this->cookieBag->has($this->getName())) {
            $this->cookieBag->remove($this->getName());
        }

        // Erase on the server side
        return session_destroy();
    }
1255843
public function destroy() {
        if ($this->getId()) {
            // Clear all session variables
            $_SESSION = array();

            // Delete session cookie
            if (ini_get("session.use_cookies")) {
                $params = session_get_cookie_params();
                setcookie($this->getName(), '', time() - 42000,
                    $params["path"], $params["domain"],
                    $params["secure"], $params["httponly"]
                );
            }

            // Destroy session
            $this->destroySession();
        }
    }
300603
public function destroy()
	{
		$this->clear();

		if (\ini_get('session.use_cookies'))
		{
			$params = \session_get_cookie_params();
			\setcookie(
				\ini_get('session.name'), '', time() - 4200,
				$params['path'], $params['domain'],
				$params['secure'], $params['httponly']
			);
		}

		$this->started = false;
		return \session_destroy();
	}
542937
public function kill_session()
    {
        $this->plugins->exec_hook('session_destroy');

        $this->session->kill();
        $_SESSION = array('language' => $this->user->language, 'temp' => true, 'skin' => $this->config->get('skin'));
        $this->user->reset();
    }