toString() public static method

public static toString ( integer $mode ) : null | string
$mode integer
return null | string
Beispiel #1
0
 /**
  * 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);
 }