Esempio n. 1
0
 /**
  * Define template and template variables
  */
 public function setTemplate()
 {
     $path = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../templates/pages');
     $this->template = Manager::getTemplate($path);
     $this->template->context('manager', Manager::getInstance());
     $this->template->context('page', $this);
     $this->template->context('charset', Manager::getOptions('charset'));
     $this->template->context('template', $this->template);
 }
Esempio n. 2
0
 private function processTemplate()
 {
     $baseName = basename($this->viewFile);
     $template = Manager::getTemplate(dirname($this->viewFile));
     $template->context('manager', Manager::getInstance());
     $template->context('page', Manager::getPage());
     $template->context('view', $this);
     $template->context('data', $this->data);
     $template->context('template', $template);
     $template->context('painter', Manager::getPainter());
     return $template->fetch($baseName);
 }