<?php

/**
 * Index of the page
 *
 * @author András Würth <wuertha@live.com>
 */;

/** The DOCUMENT_ROOT of app */
define('DOCUMENT_ROOT', __DIR__);

// initialize the frame
require_once './xof/xof_init.php';

// create instance, and initialize dispatcher
$dispatcher = new Dispatcher($_SERVER['REQUEST_URI']);

// create instance, and initialize config
$config = new Config;

// create instance, and initialize view
$view = new View;

// set default document root
$view->setDocumentRoot(DOCUMENT_ROOT);

// set default layout
$view->setLayout('default');

// create application instance
$application = new Application($dispatcher, $view, $config);

// run application
$application->run();
