src/mako/session/Session.php
public function regenerateId(bool $keepOld = false): string
	{
		// Delete old data if we don't want to keep it

		if(!$keepOld)
		{
			$this->store->delete($this->sessionId);
		}

		// Generate a new id and set a new cookie

		$this->sessionId = $this->generateId();

		$this->setCookie();

		// Return the new session id

		return $this->sessionId;
	}
public function regenerateId(bool $keepOld = false): string
	{
		// Delete old data if we don't want to keep it

		if(!$keepOld)
		{
			$this->store->delete($this->sessionId);
		}

		// Generate a new id and set a new cookie

		$this->sessionId = $this->generateId();

		$this->setCookie();

		// Return the new session id

		return $this->sessionId;
	}
public function regenerateId ( bool $ keepOld = false ) : string { // Delete old data if we don't want to keep it if ( ! $ keepOld ) { $ this -> store -> delete ( $ this -> sessionId ) ; } // Generate a new id and set a new cookie $ this -> sessionId = $ this -> generateId ( ) ; $ this -> setCookie ( ) ; // Return the new session id return $ this -> sessionId ; }
Regenerate the session id and returns it.

@param  bool   $keepOld Keep the session data associated with the old session id?
@return string
Regenerate the session id and returns it .