public function regenerate()
    {
        $this->init();

        # Generate a new session
        session_start();
        session_regenerate_id();

        # Get the newly generated ID
        $this->id = session_id();

        # Remove the lock from the session file
        session_write_close();

        return $this->id;
    }