Ejemplo n.º 1
0
 public function proxy($filename)
 {
     $ext = substr(strrchr($filename, '.'), 1);
     header('Content-Type: ' . $this->getContentType($ext));
     readfile($filename);
     $this->kernel->shutDown(0);
 }
Ejemplo n.º 2
0
 protected function renderTemplate($templateName)
 {
     // include tpl file.
     $tpl = $this->kernel->findFileOnPath($templateName, $this->kernel->getTemplatesPath());
     if (!$tpl) {
         throw new Exception("Template `{$templateName}` not found");
     }
     $HD_PUBLIC = $this->kernel->getParam('public', '');
     ob_start();
     include $tpl;
     return ob_get_clean();
 }