Example #1
0
 public function get()
 {
     $full_file_name = $this->getCssFileName();
     $file = new File($full_file_name, 'text/css');
     if ($file->validateFileExtension(array('.css', '.less'), '.css') && $file->exists()) {
         $this->embedImages($file);
         $file->doDownload();
         exit;
     } else {
         header('HTTP/1.0 404 not found');
     }
 }
Example #2
0
 public function get()
 {
     $full_file_name = $this->getFileName();
     $file = new File($full_file_name, 'image/' . pathinfo($full_file_name, PATHINFO_EXTENSION));
     if ($file->validateFileExtension() && $file->exists()) {
         $file->doDownload();
         exit;
     } else {
         header('HTTP/1.0 404 not found');
         exit;
     }
 }
Example #3
0
 public function get()
 {
     $full_file_name = $this->getFileName();
     $file = new File($full_file_name, 'text/javascript');
     if ($file->validateFileExtension(array('.js', '.javascript', '.css'), '.js') && $file->exists()) {
         if ($this->request->getRequestParam('tokenized')) {
             $file->replaceLanguageAndPHPTokens($this->request->language);
         }
         if (pathinfo($full_file_name, PATHINFO_EXTENSION) == 'css') {
             $file->setContentType('text/css');
         }
         $file->doDownload();
         exit;
     } else {
         header('HTTP/1.0 404 not found');
     }
 }