<?php
/***************************************************************
* ARASPHP WEB DEVELOPING FRAMEWORK
*
* Website: www.arasphp.org
* Author: Arturo López Pérez
* hide@address.com
* Version: 0.02
***************************************************************
*
* This file it's part of ArasPhp Web developing framework.
*
* This project is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This project is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* INDEX MAIN FILE
* This file loads all dependencies and executes the framework code in the correct order
*
*
* 1) Config files
* 2) Libraries
* 3) Core model and controller
* 4) Session classes
* 5) Dispatcher
* 6) Helpers
* 7) Execution process
*
* @author Arturo López
*
/*
* PATHS AND CONFIG
*/
require_once("core/config/paths.php");
require_once(CONFIG . "config.php");
/*
* LIBRARIES
*/
require_once(LIBS . "ErrorLogger.php");
require_once(LIBS . "Model.php");
require_once(LIBS . "Controller.php");
require_once(LIBS . "Core.php");
require_once(LIBS . "SearchEngine.php");
/*
* CORE
*/
require_once(CORE . "AppModel.php");
require_once(CORE . "AppController.php");
/*
* SESSION CLASSES
*/
require(ACTION . "LoadSessionClasses.php");
/*
* DISPATCHER
*/
require_once(LIBS . "Dispatcher.php");
/*
* HELPERS
*/
require_once(HELPER . "Validator.php");
require_once(HELPER . "Html.php");
require_once(HELPER . "Query.php");
require_once(HELPER . "Session.php");
require_once(HELPER . "Form.php");
/*
* DATABASE CONNECTION
*/
Core::openConnection();
/*
* EXECUTION PROCCESS
*/
// Controller execution
require(ACTION . "ExecuteController.php");
// Layour render
if(!isset($setLayout))
{
require(Html::getLayoutLink(DEFAULT_LAYOUT));
} else {
require(Html::getLayoutLink($setLayout));
}
?>