public function test() { $val = new \SoftUni\FMK\Validator(); $val->setRule('minlength', 'sisi', 3); var_dump($val->validate()); print_r($val->getErrors()); $view = \SoftUni\FMK\View::getInstance(); $view->username = '******'; $view->appendToLayout('body', 'admin.index'); $view->appendToLayout('body2', 'index'); $view->display('layouts.default', ['ala', 'bala']); \SoftUni\FMK\InputData::getInstance()->get(0, 'int'); \SoftUni\FMK\App::getInstance()->displayError(404); exit; }
public function displayError($error) { try { $view = View::getInstance(); $view->display('errors' . $error); // TODO proper catch! } catch (\Exception $ex) { //TODO header status \SoftUni\FMK\Common::headerStatus($error); echo '<h1>' . $error . '</h1>'; exit; } }