<?php
/**
 * Created by PhpStorm.
 * User: anchi
 * Date: 09.12.2019
 * Time: 1:30
 */

namespace core;


class App
{
    public static $app;
    /**
     *
     */
    public function __construct(){
        //session_start();
        self::$app = Registry::getInstance();
        $this->getParams();
        new ErrorHandler();
        Router::dispatch();
    }
    /**
     *
     */
    protected function getParams(){

        $params = require_once CONF.'/param.php';
        if(!empty($params)){
            foreach($params as $k => $v){
                self::$app->setProperties($k, $v);
            }
        }
    }
}