public function init() { /* Initialize action controller here */ MyLayoutManager::getInstance()->setLayoutFileName("backend.phtml"); $session = SessionDataModel::getInstance(); if ($this->getParam('action') != 'login') { $user = $session->getMyUser(); if ($user == null) { $url = '/manage/login'; $this->redirect($url); } } }
public function dispatchLoopShutdown() { $content = $this->getResponse()->getBody(); $this->getResponse()->clearBody(); $this->getResponse()->appendBody(MyLayoutManager::getInstance()->render($content)); }