<?php
/**
 * MV - content management framework for building websites and applications.
 * 
 * https://mv-framework.com
 * https://mv-framework.ru
 */

//Load the autoload file to initialize the application
require_once 'config/autoload.php';

//Create the main Builder object, which manages models, plugins, and core features
$mv = new Builder();

//Include the pre-view script, executed before rendering any views
include $mv -> views_path.'main-index-include.php';

try{
    //Use the router to determine the current route and include the corresponding view file
    include $mv -> router -> defineRoute();
}
catch(FrontHttpStatusException $exception)
{
    //Process http status exception if fired
    include $mv -> handleFrontHttpStatusException($exception);
}

//Display the debug panel at the bottom of the page if 'DebugPanel' is enabled in settings
$mv -> displayDebugPanel();