3 * A class holding general data about the application and some methods for
4 * the management including the entry point.
10 * You need to create a folder in the folder "application" named "my_app"
11 * (without the quotes) and create a include file called
12 * class_ApplicationHelper.php. You have to write the same class for your
13 * application and implement the same interface called ManageableApplication
14 * because this class include file will be searched for.
16 * It is good when you avoid more GET parameters to keep URLs short and sweet.
17 * But sometimes you need some GET paramerers e.g. for your imprint or info page
18 * or other linked pages which you have to create and state some informations.
20 * Please remember that this include file is being loaded *before* the class
21 * loader is loading classes from "exceptions", "interfaces" and "main"!
23 * @author Roland Haeder <roland __NOSPAM__ [at] __REMOVE_ME__ mxchange [dot] org>
26 class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplication {
28 * The version number of this application
30 private $appVersion = "";
33 * The human-readable name for this application
35 private $appName = "";
38 * The short uni*-like name for this application
40 private $shortName = "";
43 * An instance of this class
45 private static $thisInstance = null;
52 private function __construct () {
53 // Call parent constructor
54 parent::constructor(__CLASS__);
57 $this->setPartDescr("Application-Helper");
59 // Create an unique ID
60 $this->createUniqueID();
63 $this->removeSystemArray();
67 * Getter for an instance of this class
69 * @return $thisInstance An instance of this class
71 public final static function getInstance () {
72 // Is the instance there?
73 if (is_null(self::$thisInstance)) {
74 self::$thisInstance = new ApplicationHelper();
77 // Return the instance
78 return self::$thisInstance;
82 * Getter for the version number
84 * @return $appVersion The application's version number
86 public final function getAppVersion () {
87 return $this->appVersion;
91 * Setter for the version number
93 * @param $appVersion The application's version number
96 public final function setAppVersion ($appVersion) {
98 $appVersion = (string) $appVersion;
99 $this->appVersion = $appVersion;
103 * Getter for human-readable name
105 * @return $appName The application's human-readable name
107 public final function getAppName () {
108 return $this->appName;
112 * Setter for human-readable name
114 * @param $appName The application's human-readable name
117 public final function setAppName ($appName) {
119 $appName = (string) $appName;
120 $this->appName = $appName;
124 * Getter for short uni*-like name
126 * @return $shortName The application's short uni*-like name
128 public final function getAppShortName () {
129 return $this->shortName;
133 * Setter for short uni*-like name
135 * @param $shortName The application's short uni*-like name
138 public final function setAppShortName ($shortName) {
140 $shortName = (string) $shortName;
141 $this->shortName = $shortName;
145 * Launches the ship-simulator game
149 public final function entryPoint () {
150 // Must still be implemented!
151 trigger_error(__METHOD__.": Not implemented yet!");