public function awaken() { $this->postExists = array_key_exists(ZF_FILLED_FLAG, $_POST); $this->action = Router::Router()->getRequest(); $this->smarty = (new View())->getSmarty(); if (array_key_exists(ZF_AJAX_VALIDATION_FLAG, $_POST)) { $this->ajaxValidationMode = yes; $this->ajaxValidationName = $_POST[ZF_AJAX_VALIDATION_FLAG]; $this->ajax = new Ajax(); } else { $this->addCSRF(); $this->addInput(ZF_FILLED_FLAG, ZF_HIDDEN)->setDefault('yes'); } }