original_string: protected static function fill_filemap_cache() {
          global $CFG;
  
          self::$filemap = array();
  
          foreach (self::$filestomap as $file) {
              if (!isset(self::$filemap[$file])) {
                  self::$filemap[$file] = array();
              }
              foreach (self::$plugins as $plugintype => $plugins) {
                  if (!isset(self::$filemap[$file][$plugintype])) {
                      self::$filemap[$file][$plugintype] = array();
                  }
                  foreach ($plugins as $pluginname => $fulldir) {
                      if (file_exists("$fulldir/$file")) {
                          self::$filemap[$file][$plugintype][$pluginname] = "$fulldir/$file";
                      }
                  }
              }
          }
      }
code: protected static function fill_filemap_cache() {
          global $CFG;
  
          self::$filemap = array();
  
          foreach (self::$filestomap as $file) {
              if (!isset(self::$filemap[$file])) {
                  self::$filemap[$file] = array();
              }
              foreach (self::$plugins as $plugintype => $plugins) {
                  if (!isset(self::$filemap[$file][$plugintype])) {
                      self::$filemap[$file][$plugintype] = array();
                  }
                  foreach ($plugins as $pluginname => $fulldir) {
                      if (file_exists("$fulldir/$file")) {
                          self::$filemap[$file][$plugintype][$pluginname] = "$fulldir/$file";
                      }
                  }
              }
          }
      }
code_tokens: protected static function fill_filemap_cache ( ) { global $ CFG ; self :: $ filemap = array ( ) ; foreach ( self :: $ filestomap as $ file ) { if ( ! isset ( self :: $ filemap [ $ file ] ) ) { self :: $ filemap [ $ file ] = array ( ) ; } foreach ( self :: $ plugins as $ plugintype => $ plugins ) { if ( ! isset ( self :: $ filemap [ $ file ] [ $ plugintype ] ) ) { self :: $ filemap [ $ file ] [ $ plugintype ] = array ( ) ; } foreach ( $ plugins as $ pluginname => $ fulldir ) { if ( file_exists ( "$fulldir/$file" ) ) { self :: $ filemap [ $ file ] [ $ plugintype ] [ $ pluginname ] = "$fulldir/$file" ; } } } } }
docstring: Fills up the cache defining what plugins have certain files.
  
  @see self::get_plugin_list_with_file
  @return void
docstring_tokens: Fills up the cache defining what plugins have certain files .