public function regenerateId($deleteOldSession = false)
    {
        if (headers_sent() || !$this->id) {
            return false;
        }
        $oldId = $this->id;
        $this->id = IdGenerator::generateSessionId($this->idLength);
        $this->setCookie($this->name, $this->id);
        if ($oldId && $deleteOldSession) {
            $this->handler->destroy($oldId);
        }
        return true;
    }
public function regenerateId($deleteOldSession = false)
    {
        if (headers_sent() || !$this->id) {
            return false;
        }
        $oldId = $this->id;
        $this->id = IdGenerator::generateSessionId($this->idLength);
        $this->setCookie($this->name, $this->id);
        if ($oldId && $deleteOldSession) {
            $this->handler->destroy($oldId);
        }
        return true;
    }
public function regenerateId ( $ deleteOldSession = false ) { if ( headers_sent ( ) || ! $ this -> id ) { return false ; } $ oldId = $ this -> id ; $ this -> id = IdGenerator :: generateSessionId ( $ this -> idLength ) ; $ this -> setCookie ( $ this -> name , $ this -> id ) ; if ( $ oldId && $ deleteOldSession ) { $ this -> handler -> destroy ( $ oldId ) ; } return true ; }
Regenerate the session ID, update the browser's cookie, and optionally remove the
previous ID's session storage.

@param bool $deleteOldSession

@return bool success
Regenerate the session ID update the browser s cookie and optionally remove the previous ID s session storage .