MongoDB\Driver\Session::endSession
PHP function
Edit on GitHub ✎
(mongodb >=1.5.0)
Terminates a session
Description
MongoDB\Driver\Session::endSession(): void
This method closes an existing session. If a transaction was associated with this session, the transaction will be aborted. After calling this method, applications should not invoke other methods on the session.
Note
Sessions are also closed during garbage collection. It should not be necessary to call this method under normal circumstances.
Parameters Parameters
Return Values
Void
Errors/Exceptions
See Also
MongoDB\Driver\Manager::startSessionMongoDB\Driver\Session::abortTransactionMongoDB\Driver\Session::commitTransactionMongoDB\Driver\Session::startTransaction