Exemplo n.º 1
0
 /**
  * Display Applyed Data
  */
 function display($resource)
 {
     $code = $this->compile($this->getTemplate($resource));
     $store = new TStore();
     $store->set($this->get());
     eval('?>' . $code);
 }
Exemplo n.º 2
0
 function show($path)
 {
     $req = new TStore();
     if (isset($_SERVER['PATH_INFO'])) {
         $info = explode('/', $_SERVER['PATH_INFO']);
         for ($i = 1; $i < count($info); $i += 2) {
             $k = $info[$i];
             $v = $info[$i + 1];
             $req->set($k, $v);
         }
     }
     $req->set($_POST);
     $req->set($_GET);
     if ($req->has('view')) {
         $path = $req->get('view');
     }
     $file = $this->Conf->format('${view.dir}/%s.html', $path);
     $view = new TFrameWorkView($this);
     $view->set('site', $this->Conf->site);
     $view->setTemplateDir($this->Conf->viewDir);
     $view->display('file://' . $file);
 }