original_string: protected function get_qtype_handler($qtype) {
  
          if (is_null($this->qtypehandlers)) {
              // initialize the list of qtype handler instances
              $this->qtypehandlers = array();
              foreach (core_component::get_plugin_list('qtype') as $qtypename => $qtypelocation) {
                  $filename = $qtypelocation.'/backup/moodle1/lib.php';
                  if (file_exists($filename)) {
                      $classname = 'moodle1_qtype_'.$qtypename.'_handler';
                      require_once($filename);
                      if (!class_exists($classname)) {
                          throw new moodle1_convert_exception('missing_handler_class', $classname);
                      }
                      $this->log('registering handler', backup::LOG_DEBUG, $classname, 2);
                      $this->qtypehandlers[$qtypename] = new $classname($this, $qtypename);
                  }
              }
          }
  
          if ($qtype === '*') {
              return $this->qtypehandlers;
  
          } else if (isset($this->qtypehandlers[$qtype])) {
              return $this->qtypehandlers[$qtype];
  
          } else {
              return false;
          }
      }
code: protected function get_qtype_handler($qtype) {
  
          if (is_null($this->qtypehandlers)) {
              // initialize the list of qtype handler instances
              $this->qtypehandlers = array();
              foreach (core_component::get_plugin_list('qtype') as $qtypename => $qtypelocation) {
                  $filename = $qtypelocation.'/backup/moodle1/lib.php';
                  if (file_exists($filename)) {
                      $classname = 'moodle1_qtype_'.$qtypename.'_handler';
                      require_once($filename);
                      if (!class_exists($classname)) {
                          throw new moodle1_convert_exception('missing_handler_class', $classname);
                      }
                      $this->log('registering handler', backup::LOG_DEBUG, $classname, 2);
                      $this->qtypehandlers[$qtypename] = new $classname($this, $qtypename);
                  }
              }
          }
  
          if ($qtype === '*') {
              return $this->qtypehandlers;
  
          } else if (isset($this->qtypehandlers[$qtype])) {
              return $this->qtypehandlers[$qtype];
  
          } else {
              return false;
          }
      }
code_tokens: protected function get_qtype_handler ( $ qtype ) { if ( is_null ( $ this -> qtypehandlers ) ) { // initialize the list of qtype handler instances $ this -> qtypehandlers = array ( ) ; foreach ( core_component :: get_plugin_list ( 'qtype' ) as $ qtypename => $ qtypelocation ) { $ filename = $ qtypelocation . '/backup/moodle1/lib.php' ; if ( file_exists ( $ filename ) ) { $ classname = 'moodle1_qtype_' . $ qtypename . '_handler' ; require_once ( $ filename ) ; if ( ! class_exists ( $ classname ) ) { throw new moodle1_convert_exception ( 'missing_handler_class' , $ classname ) ; } $ this -> log ( 'registering handler' , backup :: LOG_DEBUG , $ classname , 2 ) ; $ this -> qtypehandlers [ $ qtypename ] = new $ classname ( $ this , $ qtypename ) ; } } } if ( $ qtype === '*' ) { return $ this -> qtypehandlers ; } else if ( isset ( $ this -> qtypehandlers [ $ qtype ] ) ) { return $ this -> qtypehandlers [ $ qtype ] ; } else { return false ; } }
docstring: Provides access to the qtype handlers
  
  Returns either list of all qtype handler instances (if passed '*') or a particular handler
  for the given qtype or false if the qtype is not supported.
  
  @throws moodle1_convert_exception
  @param string $qtype the name of the question type or '*' for returning all
  @return array|moodle1_qtype_handler|bool
docstring_tokens: Provides access to the qtype handlers