original_string: protected function lock()
      {
          $this->tables->execute();
          $table = array();
  
          while ($a = $this->tables->fetch(\PDO::FETCH_ASSOC)) {
              $table[] = current($a);
          }
  
          return !$table || $this->pdo->exec('LOCK TABLES `'.implode('` WRITE, `', $table).'` WRITE');
      }
code: protected function lock()
      {
          $this->tables->execute();
          $table = array();
  
          while ($a = $this->tables->fetch(\PDO::FETCH_ASSOC)) {
              $table[] = current($a);
          }
  
          return !$table || $this->pdo->exec('LOCK TABLES `'.implode('` WRITE, `', $table).'` WRITE');
      }
code_tokens: protected function lock ( ) { $ this -> tables -> execute ( ) ; $ table = array ( ) ; while ( $ a = $ this -> tables -> fetch ( \ PDO :: FETCH_ASSOC ) ) { $ table [ ] = current ( $ a ) ; } return ! $ table || $ this -> pdo -> exec ( 'LOCK TABLES `' . implode ( '` WRITE, `' , $ table ) . '` WRITE' ) ; }
docstring: Locks all tables.
  
  @return bool
docstring_tokens: Locks all tables .