Browse Source

session write & close

Erwane Breton 8 years ago
parent
commit
c6fd3f2b56
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/Http/Session.php

+ 14 - 0
src/Http/Session.php

@@ -369,6 +369,20 @@ class Session
     }
 
     /**
+     * Write datas and close the session
+     *
+     * @return bool True if session was started
+     */
+    public function close()
+    {
+        if (!$this->_started) {
+            return true;
+        }
+
+        return session_write_close();
+    }
+
+    /**
      * Determine if Session has already been started.
      *
      * @return bool True if session has been started.