original_string: public static function get_component_directory($component) {
          global $CFG;
  
          list($type, $plugin) = self::normalize_component($component);
  
          if ($type === 'core') {
              if ($plugin === null) {
                  return $path = $CFG->libdir;
              }
              return self::get_subsystem_directory($plugin);
          }
  
          return self::get_plugin_directory($type, $plugin);
      }
code: public static function get_component_directory($component) {
          global $CFG;
  
          list($type, $plugin) = self::normalize_component($component);
  
          if ($type === 'core') {
              if ($plugin === null) {
                  return $path = $CFG->libdir;
              }
              return self::get_subsystem_directory($plugin);
          }
  
          return self::get_plugin_directory($type, $plugin);
      }
code_tokens: public static function get_component_directory ( $ component ) { global $ CFG ; list ( $ type , $ plugin ) = self :: normalize_component ( $ component ) ; if ( $ type === 'core' ) { if ( $ plugin === null ) { return $ path = $ CFG -> libdir ; } return self :: get_subsystem_directory ( $ plugin ) ; } return self :: get_plugin_directory ( $ type , $ plugin ) ; }
docstring: Return exact absolute path to a plugin directory.
  
  @param string $component name such as 'moodle', 'mod_forum'
  @return string full path to component directory; NULL if not found
docstring_tokens: Return exact absolute path to a plugin directory .