original_string: public static function early_get_cache_plugins() {
          global $CFG;
          $result = array();
          $ignored = array('CVS', '_vti_cnf', 'simpletest', 'db', 'yui', 'tests');
          $fulldir = $CFG->dirroot.'/cache/stores';
          $items = new DirectoryIterator($fulldir);
          foreach ($items as $item) {
              if ($item->isDot() or !$item->isDir()) {
                  continue;
              }
              $pluginname = $item->getFilename();
              if (in_array($pluginname, $ignored)) {
                  continue;
              }
              if (!is_valid_plugin_name($pluginname)) {
                  // Better ignore plugins with problematic names here.
                  continue;
              }
              $result[$pluginname] = $fulldir.'/'.$pluginname;
              unset($item);
          }
          unset($items);
          return $result;
      }
code: public static function early_get_cache_plugins() {
          global $CFG;
          $result = array();
          $ignored = array('CVS', '_vti_cnf', 'simpletest', 'db', 'yui', 'tests');
          $fulldir = $CFG->dirroot.'/cache/stores';
          $items = new DirectoryIterator($fulldir);
          foreach ($items as $item) {
              if ($item->isDot() or !$item->isDir()) {
                  continue;
              }
              $pluginname = $item->getFilename();
              if (in_array($pluginname, $ignored)) {
                  continue;
              }
              if (!is_valid_plugin_name($pluginname)) {
                  // Better ignore plugins with problematic names here.
                  continue;
              }
              $result[$pluginname] = $fulldir.'/'.$pluginname;
              unset($item);
          }
          unset($items);
          return $result;
      }
code_tokens: public static function early_get_cache_plugins ( ) { global $ CFG ; $ result = array ( ) ; $ ignored = array ( 'CVS' , '_vti_cnf' , 'simpletest' , 'db' , 'yui' , 'tests' ) ; $ fulldir = $ CFG -> dirroot . '/cache/stores' ; $ items = new DirectoryIterator ( $ fulldir ) ; foreach ( $ items as $ item ) { if ( $ item -> isDot ( ) or ! $ item -> isDir ( ) ) { continue ; } $ pluginname = $ item -> getFilename ( ) ; if ( in_array ( $ pluginname , $ ignored ) ) { continue ; } if ( ! is_valid_plugin_name ( $ pluginname ) ) { // Better ignore plugins with problematic names here. continue ; } $ result [ $ pluginname ] = $ fulldir . '/' . $ pluginname ; unset ( $ item ) ; } unset ( $ items ) ; return $ result ; }
docstring: Returns an array of plugins without using core methods.
  
  This function explicitly does NOT use core functions as it will in some circumstances be called before Moodle has
  finished initialising. This happens when loading configuration for instance.
  
  @return string
docstring_tokens: Returns an array of plugins without using core methods .