original_string: public function define_patched_core_modules($combobase, $yuiversion, $patchlevel, $patchedmodules) {
          // The version we use is suffixed with a patchlevel so that we can get additional revisions between YUI releases.
          $subversion = $yuiversion . '_' . $patchlevel;
  
          if ($this->comboBase == $combobase) {
              // If we are using the local combobase in the loader, we can add a group and still make use of the combo
              // loader. We just need to specify a different root which includes a slightly different YUI version number
              // to include our patchlevel.
              $patterns = array();
              $modules = array();
              foreach ($patchedmodules as $modulename) {
                  // We must define the pattern and module here so that the loader uses our group configuration instead of
                  // the standard module definition. We may lose some metadata provided by upstream but this will be
                  // loaded when the module is loaded anyway.
                  $patterns[$modulename] = array(
                      'group' => 'yui-patched',
                  );
                  $modules[$modulename] = array();
              }
  
              // Actually add the patch group here.
              $this->add_group('yui-patched', array(
                  'combine' => true,
                  'root' => $subversion . '/',
                  'patterns' => $patterns,
                  'modules' => $modules,
              ));
  
          } else {
              // The CDN is in use - we need to instead use the local combobase for this module and override the modules
              // definition. We cannot use the local base - we must use the combobase because we cannot invalidate the
              // local base in browser caches.
              $fullpathbase = $combobase . $subversion . '/';
              foreach ($patchedmodules as $modulename) {
                  $this->modules[$modulename] = array(
                      'fullpath' => $fullpathbase . $modulename . '/' . $modulename . '-min.js'
                  );
              }
          }
      }
code: public function define_patched_core_modules($combobase, $yuiversion, $patchlevel, $patchedmodules) {
          // The version we use is suffixed with a patchlevel so that we can get additional revisions between YUI releases.
          $subversion = $yuiversion . '_' . $patchlevel;
  
          if ($this->comboBase == $combobase) {
              // If we are using the local combobase in the loader, we can add a group and still make use of the combo
              // loader. We just need to specify a different root which includes a slightly different YUI version number
              // to include our patchlevel.
              $patterns = array();
              $modules = array();
              foreach ($patchedmodules as $modulename) {
                  // We must define the pattern and module here so that the loader uses our group configuration instead of
                  // the standard module definition. We may lose some metadata provided by upstream but this will be
                  // loaded when the module is loaded anyway.
                  $patterns[$modulename] = array(
                      'group' => 'yui-patched',
                  );
                  $modules[$modulename] = array();
              }
  
              // Actually add the patch group here.
              $this->add_group('yui-patched', array(
                  'combine' => true,
                  'root' => $subversion . '/',
                  'patterns' => $patterns,
                  'modules' => $modules,
              ));
  
          } else {
              // The CDN is in use - we need to instead use the local combobase for this module and override the modules
              // definition. We cannot use the local base - we must use the combobase because we cannot invalidate the
              // local base in browser caches.
              $fullpathbase = $combobase . $subversion . '/';
              foreach ($patchedmodules as $modulename) {
                  $this->modules[$modulename] = array(
                      'fullpath' => $fullpathbase . $modulename . '/' . $modulename . '-min.js'
                  );
              }
          }
      }
code_tokens: public function define_patched_core_modules ( $ combobase , $ yuiversion , $ patchlevel , $ patchedmodules ) { // The version we use is suffixed with a patchlevel so that we can get additional revisions between YUI releases. $ subversion = $ yuiversion . '_' . $ patchlevel ; if ( $ this -> comboBase == $ combobase ) { // If we are using the local combobase in the loader, we can add a group and still make use of the combo // loader. We just need to specify a different root which includes a slightly different YUI version number // to include our patchlevel. $ patterns = array ( ) ; $ modules = array ( ) ; foreach ( $ patchedmodules as $ modulename ) { // We must define the pattern and module here so that the loader uses our group configuration instead of // the standard module definition. We may lose some metadata provided by upstream but this will be // loaded when the module is loaded anyway. $ patterns [ $ modulename ] = array ( 'group' => 'yui-patched' , ) ; $ modules [ $ modulename ] = array ( ) ; } // Actually add the patch group here. $ this -> add_group ( 'yui-patched' , array ( 'combine' => true , 'root' => $ subversion . '/' , 'patterns' => $ patterns , 'modules' => $ modules , ) ) ; } else { // The CDN is in use - we need to instead use the local combobase for this module and override the modules // definition. We cannot use the local base - we must use the combobase because we cannot invalidate the // local base in browser caches. $ fullpathbase = $ combobase . $ subversion . '/' ; foreach ( $ patchedmodules as $ modulename ) { $ this -> modules [ $ modulename ] = array ( 'fullpath' => $ fullpathbase . $ modulename . '/' . $ modulename . '-min.js' ) ; } } }
docstring: Define YUI modules which we have been required to patch between releases.
  
  We must do this because we aggressively cache content on the browser, and we must also override use of the
  external CDN which will serve the true authoritative copy of the code without our patches.
  
  @param String combobase The local combobase
  @param String yuiversion The current YUI version
  @param Int patchlevel The patch level we're working to for YUI
  @param Array patchedmodules An array containing the names of the patched modules
  @return void
docstring_tokens: Define YUI modules which we have been required to patch between releases .