From 837c04c400688a7f8c07f846fb6f53b7bd8a617b Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 19 May 2014 00:53:59 +0200 Subject: [PATCH] Fixed handling errors --- src/Controllers/AbstractController.php | 22 ---------------------- 1 file changed, 22 deletions(-) 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;