/** * Méthode qui génère le fichier css admin.css ou site.css * * @param type type du fichier (admin|site) * @return boolean vrai si cache généré * @author Stephane F **/ public function cssCache($type) { $cache = ''; foreach ($this->aPlugins as $plugName => $plugInstance) { $filename = PLX_ROOT . PLX_CONFIG_PATH . 'plugins/' . $plugName . '.' . $type . '.css'; if (is_file($filename)) { $cache .= trim(file_get_contents($filename)); } else { $filename = PLX_PLUGINS . $plugName . '/css/' . $type . '.css'; if (is_file($filename)) { $cache .= trim(file_get_contents($filename)); } } } if (is_file(PLX_PLUGINS . $type . '.css')) { unlink(PLX_PLUGINS . $type . '.css'); } if ($cache != '') { return plxUtils::write(plxUtils::minify($cache), PLX_PLUGINS . $type . '.css'); } return true; }