name: ManagesTransactions class_comment: null dependencies: - name: Closure type: class source: Closure - name: DeadlockException type: class source: Illuminate\Database\DeadlockException - name: RuntimeException type: class source: RuntimeException - name: Throwable type: class source: Throwable properties: [] methods: - name: transaction visibility: public parameters: - name: callback - name: attempts default: '1' comment: '# * Execute a Closure within a transaction. # * # * @param \Closure $callback # * @param int $attempts # * @return mixed # * # * @throws \Throwable' - name: handleTransactionException visibility: protected parameters: - name: e - name: currentAttempt - name: maxAttempts comment: '# * Handle an exception encountered when running a transacted statement. # * # * @param \Throwable $e # * @param int $currentAttempt # * @param int $maxAttempts # * @return void # * # * @throws \Throwable' - name: beginTransaction visibility: public parameters: [] comment: '# * Start a new database transaction. # * # * @return void # * # * @throws \Throwable' - name: createTransaction visibility: protected parameters: [] comment: '# * Create a transaction within the database. # * # * @return void # * # * @throws \Throwable' - name: createSavepoint visibility: protected parameters: [] comment: '# * Create a save point within the database. # * # * @return void # * # * @throws \Throwable' - name: handleBeginTransactionException visibility: protected parameters: - name: e comment: '# * Handle an exception from a transaction beginning. # * # * @param \Throwable $e # * @return void # * # * @throws \Throwable' - name: commit visibility: public parameters: [] comment: '# * Commit the active database transaction. # * # * @return void # * # * @throws \Throwable' - name: handleCommitTransactionException visibility: protected parameters: - name: e - name: currentAttempt - name: maxAttempts comment: '# * Handle an exception encountered when committing a transaction. # * # * @param \Throwable $e # * @param int $currentAttempt # * @param int $maxAttempts # * @return void # * # * @throws \Throwable' - name: rollBack visibility: public parameters: - name: toLevel default: 'null' comment: '# * Rollback the active database transaction. # * # * @param int|null $toLevel # * @return void # * # * @throws \Throwable' - name: performRollBack visibility: protected parameters: - name: toLevel comment: '# * Perform a rollback within the database. # * # * @param int $toLevel # * @return void # * # * @throws \Throwable' - name: handleRollBackException visibility: protected parameters: - name: e comment: '# * Handle an exception from a rollback. # * # * @param \Throwable $e # * @return void # * # * @throws \Throwable' - name: transactionLevel visibility: public parameters: [] comment: '# * Get the number of active transactions. # * # * @return int' - name: afterCommit visibility: public parameters: - name: callback comment: '# * Execute the callback after a transaction commits. # * # * @param callable $callback # * @return void # * # * @throws \RuntimeException' traits: - Closure - Illuminate\Database\DeadlockException - RuntimeException - Throwable interfaces: []