Created
December 14, 2009 09:01
-
-
Save n1k0/255916 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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