Example #1
0
<?php

use Savant\Controller\CFrontController;
use Savant\Storage\DataSet\CDataSet;
require_once '../savant.php';
try {
    $engine = new \Savant\Template\CTwig();
    $tplFile = 'test' . $engine::SUFFIX;
    $engine->setTemplate($tplFile);
    $fc = new CFrontController($engine);
    $testdata = new Savant\Storage\CValueObject();
    $testdata->testvar = "World";
    $testdata->hendrik = (object) array("name" => "Broncko");
    $fc->merge($testdata);
    $fc->out();
} catch (EException $e) {
    echo $e;
}
Example #2
0
 /**
  * handle renderer requests
  */
 public function _handle()
 {
     $dsp = new $this->class(new \Savant\Storage\CDatabase($this->connection));
     $this->dataSet = $dsp->dsQuery($this->query);
     $metaInfo = $this->getMetaInformation();
     $tplEngine = new \Savant\Template\CTwig();
     $tplEngine->setTemplate(\Savant\CBootstrap::$SKINS_DIR . \DIRECTORY_SEPARATOR . 'dataset' . \Savant\Template\CTwig::SUFFIX);
     $tplEngine->title = $metaInfo->label;
     $tplEngine->assign($this->dataSet);
     $tplEngine->render();
 }