1a3fc08184d08aa618ed0c578b80191f8e0a2688
[shipsimu.git] / application / ship-simu / init.php
1 <?php
2 /**
3  * Application initializer
4  *
5  * Please remember that this include file is being loaded *before* the class
6  * loader is loading classes from "exceptions", "interfaces" and "main"!
7  *
8  * You can prevent adding this application to the selector by uncommenting the
9  * following line:
10  *
11  * if ((isset($this)) && (is_object($this)) && ($this->isClass("ApplicationSelector"))) { return; }
12  *
13  * isset() is required to prevent a warning and is_object() is highly required
14  * when the application itself is requested in URL (hint: index.php?app=your_app)
15  *
16  * @author              Roland Haeder <webmaster@ship-simu.org>
17  * @version             0.0.0
18  * @copyright   Copyright(c) 2007, 2008 Roland Haeder, this is free software
19  * @license             GNU GPL 3.0 or any newer version
20  * @link                http://www.ship-simu.org
21  *
22  * This program is free software: you can redistribute it and/or modify
23  * it under the terms of the GNU General Public License as published by
24  * the Free Software Foundation, either version 3 of the License, or
25  * (at your option) any later version.
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30  * GNU General Public License for more details.
31  *
32  * You should have received a copy of the GNU General Public License
33  * along with this program. If not, see <http://www.gnu.org/licenses/>.
34  */
35
36 // Get an instance of the helper
37 $eval = sprintf("\$app = %s::getInstance();",
38         FrameworkConfiguration::getInstance()->readConfig("app_helper_class")
39 );
40 eval($eval);
41
42 // Set application name and version
43 $app->setAppName("Ship-Simu Schiffsimulator");
44 $app->setAppVersion("0.0.0");
45 $app->setAppShortName("ship-simu");
46
47 // Initialize output system
48 require(PATH . "inc/output.php");
49
50 // Initialize file i/o system
51 require(PATH . "inc/file_io.php");
52 $app->setFileIOInstance($io);
53
54 // Include the language sub-system
55 require(PATH . "inc/language.php");
56 $app->setLanguageInstance($lang);
57
58 // This application needs a database connection then we have to simply include
59 // the inc/database.php script
60 require(PATH . "inc/database.php");
61
62 // [EOF]
63 ?>