original_string: public function getComponentInstallDirectory($component)
      {
          list($type, $name) = $this->normalizeComponent($component);
  
          // Must use reflection to avoid using static cache.
          $method = new \ReflectionMethod('core_component', 'fetch_plugintypes');
          $method->setAccessible(true);
          $result = $method->invoke(null);
  
          if (!array_key_exists($type, $result[0])) {
              throw new \InvalidArgumentException(sprintf('The component %s has an unknown plugin type of %s', $component, $type));
          }
  
          return $result[0][$type].'/'.$name;
      }
code: public function getComponentInstallDirectory($component)
      {
          list($type, $name) = $this->normalizeComponent($component);
  
          // Must use reflection to avoid using static cache.
          $method = new \ReflectionMethod('core_component', 'fetch_plugintypes');
          $method->setAccessible(true);
          $result = $method->invoke(null);
  
          if (!array_key_exists($type, $result[0])) {
              throw new \InvalidArgumentException(sprintf('The component %s has an unknown plugin type of %s', $component, $type));
          }
  
          return $result[0][$type].'/'.$name;
      }
code_tokens: public function getComponentInstallDirectory ( $ component ) { list ( $ type , $ name ) = $ this -> normalizeComponent ( $ component ) ; // Must use reflection to avoid using static cache. $ method = new \ ReflectionMethod ( 'core_component' , 'fetch_plugintypes' ) ; $ method -> setAccessible ( true ) ; $ result = $ method -> invoke ( null ) ; if ( ! array_key_exists ( $ type , $ result [ 0 ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The component %s has an unknown plugin type of %s' , $ component , $ type ) ) ; } return $ result [ 0 ] [ $ type ] . '/' . $ name ; }
docstring: Get the absolute install directory path within Moodle.
  
  @param string $component Moodle component, EG: mod_forum
  
  @return string Absolute path, EG: /path/to/mod/forum
docstring_tokens: Get the absolute install directory path within Moodle .