* Date: 10.02.15 18:41 * You must not use this file without permission. */ function swtools_filecache($files, $cacheFile) { $fh = fopen($cacheFile, 'w'); fwrite($fh, '$/', '', $content); $content = preg_replace('/^\<\?php/', '', $content); $content = preg_replace('/^\<\?/', '', $content); //var_dump($content);exit(); $modulename = basename(dirname(dirname($module))); if($modulename != 'vtlib') { $content = '/* FILE: ' . $module . '*/' . PHP_EOL . 'if(!class_exists("'.$modulename.'_Module_Model", false)) { ' . PHP_EOL . $content . PHP_EOL . '}'.PHP_EOL; } else { $content = '/* FILE: ' . $module . '*/' . PHP_EOL . '' . PHP_EOL . $content . PHP_EOL . ''.PHP_EOL; } fwrite($fh, $content); } fclose($fh); }