/** * Get the MySQL statement for locking the table underlying this repository * for simple read and/or write operations given an appropriate lock mode * * @param int $lockMode a TableLockMode constant * @return string * @throws LockException */ private function getLockString($lockMode) { $lockModeString = TableLockMode::toString($lockMode); if (!$lockModeString) { throw new LockException("Invalid lock mode: {$lockMode}"); } $tableName = $this->getTableName(); $aliases = $this->getTableAliasGuesstimates($tableName); return $this->constructLockString($tableName, $aliases, $lockModeString); }