示例#1
0
 /**
  * Specifically lock a table and release this lock when execution has finished
  * @param callable $function The code inside this function will be called while the database has locked the given tables
  * @param String... $table a list of tables to lock. It could be more than one table
  */
 public static function writeLockTables($function, $table) {
     $arguments = func_get_args();
     if (count($arguments) < 2)
         return;
     DBHelper::impl()->writeLockTablesImpl($arguments[0], array_slice($arguments, 1));
 }