Ejemplo n.º 1
0
 function __construct(Requesting $request)
 {
     $this->request = $request;
     $this->model = Db::getInstance()->getAdapter();
     \Twig_Autoloader::register();
     $path = 'user/View/' . $this->request->getController() . '/';
     $loader = new \Twig_Loader_Filesystem($path);
     $twig = new \Twig_Environment($loader);
     $fileName = $this->request->getAction() . '.html';
     $this->view = $twig->loadTemplate($fileName);
 }
Ejemplo n.º 2
0
 function handleRequest()
 {
     Db::getInstance()->connect($this->_config->getParam('adapter_db'), $this->_config->getParam('db'));
     $request = new Requesting();
     Routing::run($request);
 }