Returns options for the currently running transaction

- « MongoDB\Driver\Session::getServer

- MongoDB\Driver\Session::getTransactionState »

- PHP Manual
- MongoDB\Driver\Session
- Returns options for the currently running transaction

# MongoDB\Driver\Session::getTransactionOptions

(mongodb >=1.7.0)

MongoDB\Driver\Session::getTransactionOptions — Returns options for the currently running transaction

### Description

final public MongoDB\Driver\Session::getTransactionOptions(): ?array

Returns options for the currently running transaction.

### Parameters

This function has no parameters.

### Return Values

Returns a array containing current transaction options, or `null` if no transaction is running.

### Errors/Exceptions

- Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.

### See Also

- MongoDB\Driver\Session::getTransactionState() - Returns the current transaction state for this session