public function run() { try { $this->setConfig(); // $router = new Router($this->routeConfig['router']); $request = $router->process(); $content = $this->startController($request); $layout = new ViewModel('layout', $content); echo $layout->getView(); } catch (ConfigException $e) { echo $e->displayErrors(); } catch (Exception\WrongControllerException $e) { echo $e->displayErrors(); } }
public function indexAction() { $viewModel = new ViewModel('sell/index', ['promt' => 'sell controller']); $this->view = $viewModel->getView(); }
public function indexAction() { $viewModel = new ViewModel('index', ['promt' => 'INDEXACTION']); $this->view = $viewModel->getView(); }