/**
*/
public function process($css, $cacheid)
{
global $injector;
if (!empty($this->_params['filemtime'])) {
foreach ($css as &$val) {
$val['mtime'] = @filemtime($val['fs']);
}
}
$cache = $injector->getInstance('Horde_Cache');
$sig = hash(version_compare(PHP_VERSION, '5.4', '>=') ? 'fnv164' : 'sha1', json_encode($css) . $cacheid);
// Do lifetime checking here, not on cache display page.
if (!$cache->exists($sig, empty($this->_params['lifetime']) ? 0 : $this->_params['lifetime'])) {
$compress = new Horde_Themes_Css_Compress();
$cache->set($sig, $compress->compress($css));
}
return array(Horde::getCacheUrl('css', array('cid' => $sig)));
}