original_string: protected function register_type($identifier, $datatransfertypes, $addmessage, $namemessage, $handlermessage, $priority=100) {
          if ($this->is_known_type($identifier)) {
              throw new coding_exception("Type $identifier is already registered");
          }
  
          $add = new stdClass;
          $add->identifier = $identifier;
          $add->datatransfertypes = $datatransfertypes;
          $add->addmessage = $addmessage;
          $add->namemessage = $namemessage;
          $add->handlermessage = $handlermessage;
          $add->priority = $priority;
          $add->handlers = array();
  
          $this->types[$identifier] = $add;
      }
code: protected function register_type($identifier, $datatransfertypes, $addmessage, $namemessage, $handlermessage, $priority=100) {
          if ($this->is_known_type($identifier)) {
              throw new coding_exception("Type $identifier is already registered");
          }
  
          $add = new stdClass;
          $add->identifier = $identifier;
          $add->datatransfertypes = $datatransfertypes;
          $add->addmessage = $addmessage;
          $add->namemessage = $namemessage;
          $add->handlermessage = $handlermessage;
          $add->priority = $priority;
          $add->handlers = array();
  
          $this->types[$identifier] = $add;
      }
code_tokens: protected function register_type ( $ identifier , $ datatransfertypes , $ addmessage , $ namemessage , $ handlermessage , $ priority = 100 ) { if ( $ this -> is_known_type ( $ identifier ) ) { throw new coding_exception ( "Type $identifier is already registered" ) ; } $ add = new stdClass ; $ add -> identifier = $ identifier ; $ add -> datatransfertypes = $ datatransfertypes ; $ add -> addmessage = $ addmessage ; $ add -> namemessage = $ namemessage ; $ add -> handlermessage = $ handlermessage ; $ add -> priority = $ priority ; $ add -> handlers = array ( ) ; $ this -> types [ $ identifier ] = $ add ; }
docstring: Used to add a new mime type that can be drag and dropped onto a
  course displayed in a browser window
  
  @param string $identifier The name that this type will be known as
  @param array $datatransfertypes An array of the different types in the browser
  'dataTransfer.types' object that will map to this type
  @param string $addmessage The message to display in the browser when this type is being
  dragged onto the page
  @param string $namemessage The message to pop up when asking for the name to give the
  course module instance when it is created
  @param string $handlermessage The message to pop up when asking which module should handle this type
  @param int $priority Controls the order in which types are checked by the browser (mainly
  needed to check for 'text' last as that is usually given as fallback)
docstring_tokens: Used to add a new mime type that can be drag and dropped onto a course displayed in a browser window