Esempio n. 1
0
 /**
  * Запуск приложения
  *
  * @throws HTTPException
  */
 public function run()
 {
     //Парсинг URI
     $parseResult = $this->router->parseUrl($this->request->getUri());
     if ($parseResult) {
         $this->controller = $this->createController();
         $this->controller->setName($this->router->getControllerClass());
         $this->controller->setAction($this->router->getAction());
         $this->controller->setRequest($this->request);
         $this->controller->run();
     }
 }
Esempio n. 2
0
 public function __construct(Controller $controller, $viewName, $data)
 {
     $this->basePath = dirname(__FILE__) . '/../view/' . strtolower($controller->getName()) . '/';
     $this->viewName = $viewName;
     $this->data = $data;
 }