public function onBeforeExecute() { $val = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'; Registry::set('isAjaxRequest', $val); if ($val) { $obj = new \MvcEngine\Tools\AjaxObHandler(); ob_start(array($obj, 'obHandler')); } }
public function onBeforeExecute() { $clientSession = new \MvcEngine\Tools\Session($this->params['name'], $this->params); Tools\Registry::set('clientSession', $clientSession); }
/** * pushes routing data in registry * * @param $routeData */ public function setRouteData($routeData) { Registry::set('routeData', $routeData); }
public function onAfterExecute() { $this->template->setData($this->data); $res = $this->template->process(); Registry::get('response')->setBody($res); }
public function testTest() { //new \MvcEngine\Models\Base(); \MvcEngine\Tools\Registry::set('dirCache', __DIR__ . '/../cache/'); }