Esempio n. 1
0
 /**
  * Fungsi untuk menampilkan file CSS
  */
 public function css()
 {
     if (func_num_args() != 1) {
         return;
     }
     $arg = func_get_arg(0);
     $path = APPPATH . 'static/css/' . $arg;
     $file = basename($path);
     if (!file_exists($path)) {
         log_message('error', 'URI passed seems invalid and manually typed');
         show_404($arg);
     }
     header('Content-Type: text/css');
     header('Charset: UTF-8');
     header(date(DATE_COOKIE, time() + 18144000));
     if (!class_exists('jsloc')) {
         include APPPATH . 'libraries/jsloc.php';
     }
     // Minify CSS
     $minify = jsloc::minCSS(@file_get_contents($path));
     echo $minify;
 }
Esempio n. 2
0
 private static function getInstance()
 {
     if (is_null(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }