Continued with renaming-season:
[core.git] / application / tests / init.php
1 <?php
2 // Import framework stuff
3 use CoreFramework\Configuration\FrameworkConfiguration;
4 use CoreFramework\Helper\Application\ApplicationHelper;
5 use CoreFramework\Loader\ClassLoader;
6
7 /**
8  * Application initializer
9  *
10  * @author              Roland Haeder <webmaster@shipsimu.org>
11  * @version             0.0
12  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
13  * @license             GNU GPL 3.0 or any newer version
14  *
15  * This program is free software: you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation, either version 3 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
27  */
28
29 // Scan for application's classes, exceptions and interfaces
30 ClassLoader::scanApplicationClasses();
31
32 // Get config instance
33 $cfg = FrameworkConfiguration::getSelfInstance();
34
35 // Initialize output system
36 ApplicationHelper::createDebugInstance('ApplicationHelper');
37
38 // This application needs a database connection then we have to simply include
39 // the framework/database.php script
40 require($cfg->getConfigEntry('base_path') . 'framework/database.php');