public transaction ( callable $callback, string | null $isolationLevel = null ) : mixed | ||
$callback | callable | a valid PHP callback that performs the job. Accepts connection instance as parameter. |
$isolationLevel | string | null | The isolation level to use for this transaction. See [[Transaction::begin()]] for details. |
return | mixed | result of callback function |