original_string: protected function register_type_handler($type, $module, $message, $noname) {
          if (!$this->is_known_type($type)) {
              throw new coding_exception("Trying to add handler for unknown type $type");
          }
  
          $add = new stdClass;
          $add->type = $type;
          $add->module = $module;
          $add->message = $message;
          $add->noname = $noname ? 1 : 0;
  
          $this->types[$type]->handlers[] = $add;
      }
code: protected function register_type_handler($type, $module, $message, $noname) {
          if (!$this->is_known_type($type)) {
              throw new coding_exception("Trying to add handler for unknown type $type");
          }
  
          $add = new stdClass;
          $add->type = $type;
          $add->module = $module;
          $add->message = $message;
          $add->noname = $noname ? 1 : 0;
  
          $this->types[$type]->handlers[] = $add;
      }
code_tokens: protected function register_type_handler ( $ type , $ module , $ message , $ noname ) { if ( ! $ this -> is_known_type ( $ type ) ) { throw new coding_exception ( "Trying to add handler for unknown type $type" ) ; } $ add = new stdClass ; $ add -> type = $ type ; $ add -> module = $ module ; $ add -> message = $ message ; $ add -> noname = $ noname ? 1 : 0 ; $ this -> types [ $ type ] -> handlers [ ] = $ add ; }
docstring: Used to declare that a particular module will handle a particular type
  of dropped data
  
  @param string $type The name of the type (as declared in register_type)
  @param string $module The name of the module to handle this type
  @param string $message The message to show the user if more than one handler is registered
  for a type and the user needs to make a choice between them
  @param bool $noname If true, the 'name' dialog should be disabled in the pop-up.
  @throws coding_exception
docstring_tokens: Used to declare that a particular module will handle a particular type of dropped data