original_string: function drop_key_php($structure, $table, $key) {
  
          $result = '';
          // Validate if we can do it
          if (!$table = $structure->getTable($table)) {
              return false;
          }
          if (!$key = $table->getKey($key)) {
              return false;
          }
          if ($table->getAllErrors()) {
              return false;
          }
  
          // Add the standard PHP header
          $result .= XMLDB_PHP_HEADER;
  
          // Add contents
          $result .= XMLDB_LINEFEED;
          $result .= '        // Define key ' . $key->getName() . ' ('. $key->getXMLDBKeyName($key->getType()) . ') to be dropped form ' . $table->getName() . '.' . XMLDB_LINEFEED;
          $result .= '        $table = new xmldb_table(' . "'" . $table->getName() . "'" . ');' . XMLDB_LINEFEED;
          $result .= '        $key = new xmldb_key(' . "'" . $key->getName() . "', " . $key->getPHP(true) . ');' . XMLDB_LINEFEED;
  
          // Launch the proper DDL
          $result .= XMLDB_LINEFEED;
          $result .= '        // Launch drop key ' . $key->getName() . '.' . XMLDB_LINEFEED;
          $result .= '        $dbman->drop_key($table, $key);' . XMLDB_LINEFEED;
  
          // Add the proper upgrade_xxxx_savepoint call
          $result .= $this->upgrade_savepoint_php ($structure);
  
          // Add standard PHP footer
          $result .= XMLDB_PHP_FOOTER;
  
          return $result;
      }
code: function drop_key_php($structure, $table, $key) {
  
          $result = '';
          // Validate if we can do it
          if (!$table = $structure->getTable($table)) {
              return false;
          }
          if (!$key = $table->getKey($key)) {
              return false;
          }
          if ($table->getAllErrors()) {
              return false;
          }
  
          // Add the standard PHP header
          $result .= XMLDB_PHP_HEADER;
  
          // Add contents
          $result .= XMLDB_LINEFEED;
          $result .= '        // Define key ' . $key->getName() . ' ('. $key->getXMLDBKeyName($key->getType()) . ') to be dropped form ' . $table->getName() . '.' . XMLDB_LINEFEED;
          $result .= '        $table = new xmldb_table(' . "'" . $table->getName() . "'" . ');' . XMLDB_LINEFEED;
          $result .= '        $key = new xmldb_key(' . "'" . $key->getName() . "', " . $key->getPHP(true) . ');' . XMLDB_LINEFEED;
  
          // Launch the proper DDL
          $result .= XMLDB_LINEFEED;
          $result .= '        // Launch drop key ' . $key->getName() . '.' . XMLDB_LINEFEED;
          $result .= '        $dbman->drop_key($table, $key);' . XMLDB_LINEFEED;
  
          // Add the proper upgrade_xxxx_savepoint call
          $result .= $this->upgrade_savepoint_php ($structure);
  
          // Add standard PHP footer
          $result .= XMLDB_PHP_FOOTER;
  
          return $result;
      }
code_tokens: function drop_key_php ( $ structure , $ table , $ key ) { $ result = '' ; // Validate if we can do it if ( ! $ table = $ structure -> getTable ( $ table ) ) { return false ; } if ( ! $ key = $ table -> getKey ( $ key ) ) { return false ; } if ( $ table -> getAllErrors ( ) ) { return false ; } // Add the standard PHP header $ result .= XMLDB_PHP_HEADER ; // Add contents $ result .= XMLDB_LINEFEED ; $ result .= '        // Define key ' . $ key -> getName ( ) . ' (' . $ key -> getXMLDBKeyName ( $ key -> getType ( ) ) . ') to be dropped form ' . $ table -> getName ( ) . '.' . XMLDB_LINEFEED ; $ result .= '        $table = new xmldb_table(' . "'" . $ table -> getName ( ) . "'" . ');' . XMLDB_LINEFEED ; $ result .= '        $key = new xmldb_key(' . "'" . $ key -> getName ( ) . "', " . $ key -> getPHP ( true ) . ');' . XMLDB_LINEFEED ; // Launch the proper DDL $ result .= XMLDB_LINEFEED ; $ result .= '        // Launch drop key ' . $ key -> getName ( ) . '.' . XMLDB_LINEFEED ; $ result .= '        $dbman->drop_key($table, $key);' . XMLDB_LINEFEED ; // Add the proper upgrade_xxxx_savepoint call $ result .= $ this -> upgrade_savepoint_php ( $ structure ) ; // Add standard PHP footer $ result .= XMLDB_PHP_FOOTER ; return $ result ; }
docstring: This function will generate all the PHP code needed to
  drop one key using XMLDB objects and functions
  
  @param xmldb_structure structure object containing all the info
  @param string table table name
  @param string key key name to be dropped
  @return string PHP code to be used to drop the key
docstring_tokens: This function will generate all the PHP code needed to drop one key using XMLDB objects and functions