Skip to content

Instantly share code, notes, and snippets.

@n1k0
Created December 14, 2009 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n1k0/255916 to your computer and use it in GitHub Desktop.
Save n1k0/255916 to your computer and use it in GitHub Desktop.
<?php
/**
* @see ioCombinerResponse
*/
class RdcCombinerResponse extends ioCombinerResponse
{
/**
* Use this to replace all the specified javascripts in the response
* with the combined javascript
*/
public function replaceJavascripts()
{
if (sfConfig::get('app_io_combiner_plugin_enabled', true))
{
$this->removeFiles('javascripts');
$this->response->addJavascript(
$this->getCombinedFile('js'),
sfConfig::get('app_io_combiner_plugin_javascript_position', '')
);
}
}
/**
* Use this to replace all the specified stylesheets in the response with the combined stylesheet
*/
public function replaceStylesheets()
{
if (sfConfig::get('app_io_combiner_plugin_enabled', true))
{
$this->removeFiles('stylesheets');
$this->response->addStylesheet(
$this->getCombinedFile('css'),
sfConfig::get('app_io_combiner_plugin_stylesheet_position', ''),
array('media' => 'screen')
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment