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 __construct($connection = null)
 {
     if ($connection instanceof \PDO) {
         $this->_db = $connection;
         //self::$database = $connection;
     } else {
         if ($connection != null) {
             $this->_db = \SoftUni\FMK\App::getInstance()->getDBConnection($connection);
             //self::$database = \SoftUni\FMK\App::getInstance()->getDBConnection($connection);
             $this->_connection = $connection;
         } else {
             $this->_db = \SoftUni\FMK\App::getInstance()->getDbConnection($this->_connection);
             //self::$database = \SoftUni\FMK\App::getInstance()->getDbConnection($this->_connection);
         }
     }
 }
<?php

error_reporting(E_ALL ^ E_NOTICE);
echo '<pre>';
include '../../FMK/App.php';
$app = \SoftUni\FMK\App::getInstance();
//$db = new \SoftUni\FMK\DB\SimpleDB();
//$a = $db->prepare('SELECT * from users')->execute()->fetchAllAssoc();
//var_dump($a);
$app->run();
 public function getDefaultMethod()
 {
     $app = \SoftUni\FMK\App::getInstance();
     $method = isset($app->getConfig()->app['default_method']) ? $app->getConfig()->app['default_method'] : null;
     if ($method) {
         return strtolower($method);
     }
     return 'index';
 }