Predis\Client::createTransaction PHP Méthode

createTransaction() protected méthode

Actual transaction context initializer method.
protected createTransaction ( array $options = null, mixed $callable = null ) : MultiExec | array
$options array Options for the context.
$callable mixed Optional callable used to execute the context.
Résultat Predis\Transaction\MultiExec | array
    protected function createTransaction(array $options = null, $callable = null)
    {
        $transaction = new MultiExecTransaction($this, $options);
        if (isset($callable)) {
            return $transaction->execute($callable);
        }
        return $transaction;
    }