original_string: protected static function get_plugin_handlers($type, moodle1_converter $converter) {
          global $CFG;
  
          $handlers = array();
          $plugins = core_component::get_plugin_list($type);
          foreach ($plugins as $name => $dir) {
              $handlerfile  = $dir . '/backup/moodle1/lib.php';
              $handlerclass = "moodle1_{$type}_{$name}_handler";
              if (file_exists($handlerfile)) {
                  require_once($handlerfile);
              } elseif ($type == 'block') {
                  $handlerclass = "moodle1_block_generic_handler";
              } else {
                  continue;
              }
  
              if (!class_exists($handlerclass)) {
                  throw new moodle1_convert_exception('missing_handler_class', $handlerclass);
              }
              $handlers[] = new $handlerclass($converter, $type, $name);
          }
          return $handlers;
      }
code: protected static function get_plugin_handlers($type, moodle1_converter $converter) {
          global $CFG;
  
          $handlers = array();
          $plugins = core_component::get_plugin_list($type);
          foreach ($plugins as $name => $dir) {
              $handlerfile  = $dir . '/backup/moodle1/lib.php';
              $handlerclass = "moodle1_{$type}_{$name}_handler";
              if (file_exists($handlerfile)) {
                  require_once($handlerfile);
              } elseif ($type == 'block') {
                  $handlerclass = "moodle1_block_generic_handler";
              } else {
                  continue;
              }
  
              if (!class_exists($handlerclass)) {
                  throw new moodle1_convert_exception('missing_handler_class', $handlerclass);
              }
              $handlers[] = new $handlerclass($converter, $type, $name);
          }
          return $handlers;
      }
code_tokens: protected static function get_plugin_handlers ( $ type , moodle1_converter $ converter ) { global $ CFG ; $ handlers = array ( ) ; $ plugins = core_component :: get_plugin_list ( $ type ) ; foreach ( $ plugins as $ name => $ dir ) { $ handlerfile = $ dir . '/backup/moodle1/lib.php' ; $ handlerclass = "moodle1_{$type}_{$name}_handler" ; if ( file_exists ( $ handlerfile ) ) { require_once ( $ handlerfile ) ; } elseif ( $ type == 'block' ) { $ handlerclass = "moodle1_block_generic_handler" ; } else { continue ; } if ( ! class_exists ( $ handlerclass ) ) { throw new moodle1_convert_exception ( 'missing_handler_class' , $ handlerclass ) ; } $ handlers [ ] = new $ handlerclass ( $ converter , $ type , $ name ) ; } return $ handlers ; }
docstring: Runs through all plugins of a specific type and instantiates their handlers
  
  @todo ask mod's subplugins
  @param string $type the plugin type
  @param moodle1_converter $converter the converter requesting the handler
  @throws moodle1_convert_exception
  @return array of {@link moodle1_handler} instances
docstring_tokens: Runs through all plugins of a specific type and instantiates their handlers