Current Path : /data/web/virtuals/51568/virtual/www/subdom/pomucky.1/src/ |
Current File : /data/web/virtuals/51568/virtual/www/subdom/pomucky.1/src/Controller.php |
<?php namespace app; class Controller { public $viewFolder = ''; public $dataView; public $middlewares = []; public $action = ''; public function __construct () { $this->dataView = new \stdClass(); $this->dataView->domain = Application::$DOMAIN; $this->dataView->app = Application::$app; } public function setViewFolder($viewFolder) { $this->viewFolder = $viewFolder; } public function render($view) { return Application::$app->router->renderView($view, $this->dataView); } public function registrMiddleware($middleware) { $this->middlewares[] = $middleware; } public function getMiddlewares(): array { return $this->middlewares; } }