public function __toString() { if ($this->getLogging() == true) { $this->saveLog(); } if (Framework::getTpl()) { Framework::getTpl()->assign('exception', $this); Framework::getTpl()->assign('returnLink', isset($_SERVER['HTTP_REFERER']) == true && empty($_SERVER['HTTP_REFERER']) == false ? $_SERVER['HTTP_REFERER'] : ''); $output = Framework::getTpl()->fetch('exception/' . $this->tenplateName . '.tpl'); echo $output; } else { echo parent::__toString(); } exit; }
<?php define('SHEEPWAR', 1); require_once "global.php"; // load template engine $Framework->loadTpl(dirname(__FILE__) . '/templates/'); $Framework->loadOthers(); // load active page/modul require_once $Framework->BuildModulPath(); $activePage = $Framework->BuildModulClass(); // create active page $page = new $activePage(); // assign to use in template Framework::getTpl()->assign('activePage', Framework::getActivePage()); Framework::getTpl()->assign('activePageObj', $page); // Load data $page->loadData(); // display active page $page->show(); // clean up $Framework = null; exit;
public function show() { Framework::getTpl()->assign('data', $this->data); header('Content-type: application/json'); parent::show(); }
public function getTpl() { return Framework::getTpl(); }
public function show() { Framework::getTpl()->assign(array('headerTitle' => $this->item->ItemID . ' ' . $this->item->Name, 'item' => $this->item, 'items' => $this->items)); parent::show(); }