db\Connection transaction()

transaction() public method

Executes callback provided in a transaction.

public mixed transaction ( callable $callback, $isolationLevel = null )
$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 yii\db\Transaction::begin() for details.

return mixed

Result of callback function

throws Exception
doc_Yii
2016-10-30 16:57:52
Comments
Leave a Comment

Please login to continue.