소스 검색

adds migrate() to Session

This migrates the session to a new session id while not deleting the
actual session attributes.
Johannes Schmitt 14 년 전
부모
커밋
6432dea07c
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      src/Symfony/Component/HttpFoundation/Session.php

+ 9 - 0
src/Symfony/Component/HttpFoundation/Session.php

@@ -168,6 +168,15 @@ class Session implements \Serializable
         $this->storage->regenerate();
         $this->storage->regenerate();
     }
     }
 
 
+    /**
+     * Migrates the current session to a new session id while maintaining all
+     * session attributes.
+     */
+    public function migrate()
+    {
+        $this->storage->regenerate();
+    }
+
     /**
     /**
      * Returns the session ID
      * Returns the session ID
      *
      *