PHP Класс FactoryGirl\Provider\Doctrine\ORM\Locking\TableLock

См. также: transaction()
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Repository $repository )
transaction ( integer $lockMode, callback $transaction ) : mixed Attempt to acquire a table level lock in MySQL for the duration of the given transaction. IS NOT IN ANY WAY GUARANTEED TO WORK. MySQL requires that the aliases through which a table is accessed during this transaction are enumerated when locking tables, which due to the nature of Doctrine is a somewhat difficult task. Nevertheless, in simple cases a good guesstimate as to the table aliases can be made; see relevant methods below.

Защищенные методы

Метод Описание
getRepository ( ) : Repository

Приватные методы

Метод Описание
constructLockString ( string $tableName, array $aliases, string $lockModeString ) : string
getLockString ( integer $lockMode ) : string Get the MySQL statement for locking the table underlying this repository for simple read and/or write operations given an appropriate lock mode
getTableAliasGuesstimates ( string $tableName ) : array Attempt to guess at the table name aliases used by Doctrine for a given table name
getTableName ( ) : string
getUnlockString ( ) : string The MySQL statement required to unlock tables after a transaction

Описание методов

__construct() публичный Метод

public __construct ( Repository $repository )
$repository FactoryGirl\Provider\Doctrine\ORM\Repository

getRepository() защищенный Метод

protected getRepository ( ) : Repository
Результат FactoryGirl\Provider\Doctrine\ORM\Repository

transaction() публичный Метод

Attempt to acquire a table level lock in MySQL for the duration of the given transaction. IS NOT IN ANY WAY GUARANTEED TO WORK. MySQL requires that the aliases through which a table is accessed during this transaction are enumerated when locking tables, which due to the nature of Doctrine is a somewhat difficult task. Nevertheless, in simple cases a good guesstimate as to the table aliases can be made; see relevant methods below.
public transaction ( integer $lockMode, callback $transaction ) : mixed
$lockMode integer a TableLockMode constant
$transaction callback
Результат mixed