diff --git a/src/Controllers/AbstractController.php b/src/Controllers/AbstractController.php index 8bfed787..5b60b809 100644 --- a/src/Controllers/AbstractController.php +++ b/src/Controllers/AbstractController.php @@ -3,7 +3,6 @@ class AbstractController { protected $assets; private $layoutName; - private static $isRendered; public function isAjax() { @@ -18,12 +17,6 @@ class AbstractController $this->assets->setTitle(Core::getConfig()->main->title); } - public function __destruct() - { - if ($this->isAjax()) - $this->renderAjax(); - } - public function renderAjax() { $this->switchLayout('layout-json'); @@ -38,11 +31,6 @@ class AbstractController public function renderView($viewName) { - //no matter which controller runs it (including ErrorController), render only once - if (self::isRendered()) - return; - - self::markAsRendered(); $context = Core::getContext(); if ($viewName !== null) $context->viewName = $viewName; @@ -65,16 +53,6 @@ class AbstractController } - private static function isRendered() - { - return self::$isRendered; - } - - private static function markAsRendered() - { - self::$isRendered = true; - } - private function switchLayout($layoutName) { $this->layoutName = $layoutName;