application/selector/templates/de/code/selector_main.ctp -text
application/ship-simu/.htaccess -text
application/ship-simu/class_ApplicationHelper.php -text
+application/ship-simu/config.php -text
application/ship-simu/debug.php -text
application/ship-simu/exceptions.php -text
application/ship-simu/exceptions/.htaccess -text
inc/classes/exceptions/main/class_ConfigEntryIsEmptyException.php -text
inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php -text
inc/classes/exceptions/main/class_DimNotFoundInArrayException.php -text
+inc/classes/exceptions/main/class_EmptyVariableException.php -text
inc/classes/exceptions/main/class_ExceptionNotChangedException.php -text
inc/classes/exceptions/main/class_ExceptionNotFoundException.php -text
inc/classes/exceptions/main/class_GetterNotFoundException.php -text
inc/classes/exceptions/main/class_InvalidArrayCountException.php -text
+inc/classes/exceptions/main/class_InvalidCommandException.php -text
+inc/classes/exceptions/main/class_InvalidCommandInstanceException.php -text
+inc/classes/exceptions/main/class_InvalidControllerException.php -text
inc/classes/exceptions/main/class_InvalidObjectException.php -text
inc/classes/exceptions/main/class_MissingArrayElementsException.php -text
inc/classes/exceptions/main/class_MissingDecimalsThousandsSeperatorException.php -text
inc/classes/exceptions/main/class_NoArrayException.php -text
inc/classes/exceptions/main/class_NoObjectException.php -text
inc/classes/exceptions/main/class_NullPointerException.php -text
+inc/classes/exceptions/main/class_ResponseHeadersAlreadySentException.php -text
inc/classes/exceptions/main/class_VariableIsNotSetException.php -text
inc/classes/exceptions/template/.htaccess -text
inc/classes/exceptions/template/class_BasePathIsEmptyException.php -text
inc/classes/interfaces/commands/class_Commandable.php -text
inc/classes/interfaces/compressor/.htaccess -text
inc/classes/interfaces/compressor/class_Compressor.php -text
+inc/classes/interfaces/controller/.htaccess -text
+inc/classes/interfaces/controller/class_Controller.php -text
inc/classes/interfaces/database/.htaccess -text
inc/classes/interfaces/database/class_FrameworkDatabaseInterface.php -text
inc/classes/interfaces/database/frontend/.htaccess -text
inc/classes/interfaces/language/class_ManageableLanguage.php -text
inc/classes/interfaces/request/.htaccess -text
inc/classes/interfaces/request/class_Requestable.php -text
+inc/classes/interfaces/resolver/.htaccess -text
+inc/classes/interfaces/resolver/class_CommandResolver.php -text
+inc/classes/interfaces/resolver/class_ControllerResolver.php -text
inc/classes/interfaces/response/.htaccess -text
inc/classes/interfaces/response/class_Responseable.php -text
inc/classes/interfaces/template/.htaccess -text
inc/classes/main/commands/class_BaseCommand.php -text
inc/classes/main/commands/extended/.htaccess -text
inc/classes/main/commands/extended/class_ -text
+inc/classes/main/commands/local/.htaccess -text
+inc/classes/main/commands/local/class_LocalHomeCommand.php -text
inc/classes/main/compressor/.htaccess -text
inc/classes/main/compressor/class_Bzip2Compressor.php -text
inc/classes/main/compressor/class_GzipCompressor.php -text
inc/classes/main/console/class_ConsoleTools.php -text
inc/classes/main/controller/.htaccess -text
inc/classes/main/controller/class_BaseController.php -text
+inc/classes/main/controller/default/.htaccess -text
+inc/classes/main/controller/default/class_DefaultController.php -text
+inc/classes/main/controller/registration/.htaccess -text
+inc/classes/main/controller/registration/class_DefaultRegistrationController.php -text
inc/classes/main/database/.htaccess -text
inc/classes/main/database/class_BaseDatabaseFrontend.php -text
inc/classes/main/database/classes/.htaccess -text
inc/classes/main/output/class_WebOutput.php -text
inc/classes/main/request/.htaccess -text
inc/classes/main/request/class_HttpRequest.php -text
+inc/classes/main/resolver/.htaccess -text
+inc/classes/main/resolver/class_BaseResolver.php -text
+inc/classes/main/resolver/local/.htaccess -text
+inc/classes/main/resolver/local/class_LocalCommandResolver.php -text
+inc/classes/main/resolver/local/class_LocalControllerResolver.php -text
inc/classes/main/response/.htaccess -text
inc/classes/main/response/class_HttpResponse.php -text
inc/classes/main/template/.htaccess -text
*/
private $shortName = "";
+ /**
+ * Name of the master template
+ */
+ private $masterTemplate = "";
+
/**
* An instance of this class
*/
$this->shortName = $shortName;
}
+ /**
+ * Getter for master template name
+ *
+ * @return $masterTemplate Name of the master template
+ */
+ public final function getMasterTemplate () {
+ return $this->masterTemplate;
+ }
+
/**
* Launcher for the application selector
*
);
eval($eval);
} catch (FrameworkException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation <strong>%s</strong> kann nicht gestartet werden. Grund: <u>%s</u>",
+ ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation <strong>%s</strong> kann nicht gestartet werden. Grund: <strong>%s</strong>",
$application,
$e->getMessage()
));
*/
private $shortName = "";
+ /**
+ * The name of the master template
+ */
+ private $masterTemplate = "shipsimu_main";
+
/**
* An instance of this class
*/
/**
* Getter for the version number
*
- * @return $appVersion The application's version number
+ * @return $appVersion The application's version number
*/
public final function getAppVersion () {
return $this->appVersion;
/**
* Setter for the version number
*
- * @param $appVersion The application's version number
+ * @param $appVersion The application's version number
* @return void
*/
public final function setAppVersion ($appVersion) {
$this->shortName = $shortName;
}
+ /**
+ * Getter for master template name
+ *
+ * @return $masterTemplate Name of the master template
+ */
+ public final function getMasterTemplate () {
+ return $this->masterTemplate;
+ }
+
/**
* Launches the ship-simulator game
*
* @return void
*/
public final function entryPoint () {
- // Handle the request
- $this->handleRequest();
+ // Get default command
+ $defaultCommand = $this->getConfigInstance()->readConfig("default_command");
- // Prepare the template engine
- $tplEngine = $this->prepareTemplateEngine($this);
+ // Create a new request object
+ $requestInstance = HttpRequest::createHttpRequest();
- // Load the main template
- $tplEngine->loadCodeTemplate("shipsimu_main");
+ // ... and a new response object
+ $responseInstance = HttpResponse::createHttpResponse($this);
- // Raise an error here
- trigger_error(__METHOD__.": Unfinished work!");
+ // Get a new controller instance as well
+ $controllerInstance = LocalControllerResolver::createLocalControllerResolver($defaultCommand, $this)->resolveDefaultController();
+
+ // Handle the request
+ $controllerInstance->handleRequest($requestInstance, $responseInstance);
}
}
--- /dev/null
+<?php
+/**
+ * Additional/overwritten configuration parts
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+
+// Get a configuration instance for shorter lines
+$cfg = FrameworkConfiguration::getInstance();
+
+// CFG: DEFAULT-COMMAND
+$cfg->setConfigEntry("default_command", "home");
+
+// [EOF]
+?>
// Set application name and version
$app->setAppName("Ship-Simu Schiffsimulator");
-$app->setAppVersion("0.1");
+$app->setAppVersion("0.0.0");
$app->setAppShortName("ship-simu");
// Initialize output system
try {
ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/%s", FrameworkConfiguration::getInstance()->readConfig("application_path"), $application, $class));
} catch (PathIsNoDirectoryException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
+ ApplicationEntryPoint::app_die(sprintf("[Main:%s] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
+ $application,
$class,
$e->getMessage()
));
} catch (PathIsEmptyException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
+ ApplicationEntryPoint::app_die(sprintf("[Main:%s] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
+ $application,
$class,
$e->getMessage()
));
} catch (PathReadProtectedException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
+ ApplicationEntryPoint::app_die(sprintf("[Main:%s] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
+ $application,
$class,
$e->getMessage()
));
} catch (DirPointerNotOpenedException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
+ ApplicationEntryPoint::app_die(sprintf("[Main:%s] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
+ $application,
$class,
$e->getMessage()
));
);
eval($eval);
} catch (FrameworkException $e) {
- ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation <strong>%s</strong> kann nicht gestartet werden. Grund: <u>%s</u>",
+ ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation <strong>%s</strong> kann nicht gestartet werden. Grund: <strong>%s</strong>",
$application,
$e->getMessage()
));
{--HEADER_SHIP_SIMU--}
</div>
+<div class="shipsimu_content">
+ {?content?}
+</div>
+
+<div class="shipsimu_content">
+ {--FOOTER_SHIP_SIMU--}
+</div>
+
{?footer_msg:footer_msg={--FOOTER_SHIP_SIMU--}?}
* 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/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class Debug {
// Constructor
* attach a dedicated message to it.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when compressors are mismatching
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a container item is not an array
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a container item is null
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the container is possibly damaged
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the save path string is empty
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the save path is no directory
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the save path is read-protected
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the save path is write-protected
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a directory pointer is not opended
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a file pointer is not opened
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the length of the data mismatch
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the returned directory resource is invalid
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a MD5 checksum does not exception
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the path string is empty
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a given path is not a directory
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a path is read-protected
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the language path string is invalid
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the language path string is empty
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the language path is no directory
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the language path is read-protected
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the language handler is missing
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the language handler is missing
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when two classes are not matching
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a class was not found
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a configuration entry is empty
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a configuration entry is not found
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thron when dimension entries are not found in an array
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- /dev/null
+<?php
+/**
+ * This exception is thrown when a variable is unexpected empty
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class EmptyVariableException extends FrameworkException {
+ /**
+ * The constructor
+ *
+ * @param $msgArray Message array holding all needed data
+ * @param $code Code number for the exception
+ * @return void
+ */
+ public function __construct (array $msgArray, $code) {
+ // Add a message around the missing class
+ $message = sprintf("[%s:%d] Variable <u>%s</u> is not set.",
+ $msgArray[0]->__toString(),
+ $this->getLine(),
+ $msgArray[1]
+ );
+
+ // Call parent constructor
+ parent::__construct($message, $code);
+ }
+}
+
+// [EOF]
+?>
* An exception thrown when an exception was not changed
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
* @deprecated
*
* This program is free software: you can redistribute it and/or modify
* An exception thrown when an other exception was not found
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a getter for an attribute was not found
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($dataArray, $code) {
- // Cast the array
- $dataArray = (array) $dataArray;
-
+ public function __construct (array $dataArray, $code) {
// Add a message around the missing class
$message = sprintf("[%s:%d] Getter-Methode für Attribut <u>%s</u> nicht gefunden.",
$dataArray[0]->__toString(),
* An exception thrown when the number of array elements mismatch
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- /dev/null
+<?php
+/**
+ * This exception is thrown when a command is invalid
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class InvalidCommandException extends FrameworkException {
+ /**
+ * The constructor
+ *
+ * @param $message Message from the exception
+ * @param $code Code number for the exception
+ * @return void
+ */
+ public function __construct (array $msgArray, $code) {
+ // Add a message around the missing class
+ $message = sprintf("[%s:%d] Invalid command <u>%s</u> detected.",
+ $msgArray[0]->__toString(),
+ $this->getLine(),
+ $msgArray[1]
+ );
+
+ // Call parent constructor
+ parent::__construct($message, $code);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * This exception is thrown when a command instance is invalid
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class InvalidCommandInstanceException extends FrameworkException {
+ /**
+ * The constructor
+ *
+ * @param $message Message from the exception
+ * @param $code Code number for the exception
+ * @return void
+ */
+ public function __construct (array $msgArray, $code) {
+ // Add a message around the missing class
+ $message = sprintf("[%s:%d] Invalid command <u>%s</u> detected.",
+ $msgArray[0]->__toString(),
+ $this->getLine(),
+ $msgArray[1]
+ );
+
+ // Call parent constructor
+ parent::__construct($message, $code);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * This exception is thrown when a controller instance is invalid
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class InvalidControllerInstanceException extends FrameworkException {
+ /**
+ * The constructor
+ *
+ * @param $msgArray Array with data from the exception point
+ * @param $code Code number for the exception
+ * @return void
+ */
+ public function __construct (array $msgArray, $code) {
+ // Add a message around the missing class
+ $message = sprintf("[%s:%d] Invalid controller <u>%s</u> detected.",
+ $msgArray[0]->__toString(),
+ $this->getLine(),
+ $msgArray[1]
+ );
+
+ // Call parent constructor
+ parent::__construct($message, $code);
+ }
+}
+
+// [EOF]
+?>
* An exception thrown when an instance variable instances a non-object
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when required array elements are missing
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the decimal and thousands seperators are missing
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a method is missing
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown then no array was created in a dynamic environment
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
<?php
/**
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A deprecated exception which should be replaced with InvalidObjectException
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
* @deprecated
* @see InvalidObjectException
*
* An exception thrown when an object instance is null
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- /dev/null
+<?php
+/**
+ * An exception thrown when an object instance is null
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class ResponseHeadersAlreadySentException extends FrameworkException {
+ /**
+ * The constructor
+ *
+ * @param $message Message from the exception
+ * @param $code Code number for the exception
+ * @return void
+ */
+ public function __construct (BaseFrameworkSystem $class, $code) {
+ // Add a message around the missing class
+ $message = sprintf("[%s:%d] Headers are already sent!",
+ $class->__toString(),
+ $this->getLine()
+ );
+
+ // Call parent constructor
+ parent::__construct($message, $code);
+ }
+}
+
+// [EOF]
+?>
* An exception thrown when a variable is not set
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the base path is empty
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the base path is no directory
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the base path is read-protected
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown hen the base path string is invalid
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a template variable name is invalid
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the template type is not supported
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when the template engine instance is not supported
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An exception thrown when a given view helper was not found
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
public function __construct (array $msgArray, $code) {
// Add a message around the missing class
- $message = sprintf("[%s:] View-Helper <u>%s</u> ist ungültig.",
+ $message = sprintf("[%s:%d] View-Helper <u>%s</u> ist ungültig.",
$msgArray[0]->__toString(),
+ $this->getLine(),
$msgArray[1]
);
* - And many more...
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
function setAppShortName ($shortName);
+ /**
+ * Getter for master template name
+ *
+ * @return $masterTemplate Name of the master template
+ */
+ function getMasterTemplate ();
+
/**
* Launches the application
*
*
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* method stubs which is being used in every class
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for commands for the front controller
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for compression classes
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for controller
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+interface Controller extends FrameworkInterface {
+ /**
+ * Handles the given request and response
+ *
+ * @param $requestInstance An instance of a request class
+ * @param $responseInstance An instance of a response class
+ * @return void
+ */
+ function handleRequest (Requestable $requestInstance, Responseable $responseInstance);
+}
+
+//
+?>
* The general interface for all other database interfaces
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* compressed before they got saved to a local file.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for middleware database classes
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for debugger classes
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* DatabaseConnection class.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for streams
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for file input operations.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for file output operations.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for output streams
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for language systems
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for requests
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An instance for command resolver classes
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+interface CommandResolver extends FrameworkInterface {
+ /**
+ * Returns an command instance for a given request class
+ *
+ * @param $requestInstance An instance of a request class
+ * @return $commandInstance An instance of the resolved command
+ */
+ function resolvCommandByRequest (Requestable $requestInstance);
+
+ /**
+ * Checks wether the given command is valid
+ *
+ * @param $commandName The default command we shall execute
+ * @return $isValid Wether the given command is valid
+ * @throws EmptyVariableException Thrown if the given command is not set
+ */
+ function isCommandValid ($commandName);
+}
+
+//
+?>
--- /dev/null
+<?php
+/**
+ * An instance for controller resolver classes
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+interface ControllerResolver extends FrameworkInterface {
+ /**
+ * Resolves the default controller of the given command
+ *
+ * @return $controllerInstance A controller instance for the default command
+ */
+ function resolveDefaultController ();
+}
+
+//
+?>
* An interface for responses
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for template engines
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An interface for view helpers
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* class handles saving of games etc.
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
private $dbInstance = null;
+ /**
+ * Instance to an application helper class
+ */
+ private $applicationInstance = null;
+
/**
* The real class name
*/
const EXCEPTION_MISSING_LANGUAGE_HANDLER = 0x02e;
const EXCEPTION_MISSING_FILE_IO_HANDLER = 0x02f;
const EXCEPTION_MISSING_ELEMENT = 0x030;
+ const EXCEPTION_INVALID_COMMAND = 0x031;
+ const EXCEPTION_INVALID_CONTROLLER = 0x032;
+ const EXCEPTION_HEADERS_ALREADY_SENT = 0x033;
/**
* In the super constructor these system classes shall be ignored or else
*--------------------------------------------------------------------*
*/
private $systemClasses = array(
- "DebugMiddleware", // Debug middleware output sub-system
- "DebugWebOutput", // Debug web output sub-system
- "DebugConsoleOutput", // Debug console output sub-system
- "DebugErrorLogOutput", // Debug error_log() output sub-system
- "CompressorChannel", // Compressor sub-system
+ "DebugMiddleware", // Debug middleware output sub-system
+ "DebugWebOutput", // Debug web output sub-system
+ "DebugConsoleOutput", // Debug console output sub-system
+ "DebugErrorLogOutput", // Debug error_log() output sub-system
+ "CompressorChannel", // Compressor sub-system
"FrameworkDirectoryPointer", // Directory handler sub-system
- "NullCompressor", // Null compressor
- "Bzip2Compressor", // BZIP2 compressor
- "GzipCompressor", // GZIP compressor
- "WebOutput", // Web output sub-system
+ "NullCompressor", // Null compressor
+ "Bzip2Compressor", // BZIP2 compressor
+ "GzipCompressor", // GZIP compressor
+ "WebOutput", // Web output sub-system
);
/**
$this->fileIOInstance = $fileIOInstance;
}
+ /**
+ * Protected getter for a manageable application helper class
+ *
+ * @return $applicationInstance An instance of a manageable application helper class
+ */
+ protected final function getApplicationInstance () {
+ return $this->applicationInstance;
+ }
+
+ /**
+ * Setter for a manageable application helper class
+ *
+ * @param $applicationInstance An instance of a manageable application helper class
+ * @return void
+ */
+ public final function setApplicationInstance (ManageableApplication $applicationInstance) {
+ $this->applicationInstance = $applicationInstance;
+ }
+
/**
* Prepare the template engine (TemplateEngine by default) for a given
* application helper instance (ApplicationHelper by default).
*
- * @param $appInstance An application helper instance
+ * @param $appInstance An application helper instance or
+ * null if we shall use the default
* @return $tplEngine The template engine instance
* @throws NullPointerException If the template engine could not
* be initialized
* unsupported template engine
* @throws MissingLanguageHandlerException If the language sub-system
* is not yet initialized
- */
- protected function prepareTemplateEngine (BaseFrameworkSystem $appInstance) {
+ * @throws NullPointerException If the discovered application
+ * instance is still null
+ */
+ protected function prepareTemplateEngine (BaseFrameworkSystem $appInstance=null) {
+ // Is the application instance set?
+ if (is_null($appInstance)) {
+ // Get the current instance
+ $appInstance = $this->getApplicationInstance();
+
+ // Still null?
+ if (is_null($appInstance)) {
+ // Thrown an exception
+ throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+ }
+ }
+
// Generate FQFN for all application templates
$fqfn = sprintf("%s%s/%s/%s",
PATH,
* need more details.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A general (base) command
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class BaseCommand extends BaseFrameworkSystem {
+ /**
+ * The controller we need for this command
+ */
+ private $controllerName = "";
+
+ /**
+ * Resolver instance
+ */
+ private $resolverInstance = null;
+
/**
* Protected constructor
*
// Call parent constructor
parent::__construct($class);
}
+
+ /**
+ * Setter for controller name
+ *
+ * @param $controllerName Name of the controller assigned with this command
+ * @return void
+ */
+ public final function setControllerName ($controllerName) {
+ $this->controllerName = (string) $controllerName;
+ }
+
+ /**
+ * Getter for controller name
+ *
+ * @return $controllerName Name of the controller assigned with this command
+ */
+ public final function getControllerName () {
+ return $this->controllerName;
+ }
+
+ /**
+ * Setter for resolver instance
+ *
+ * @param $resolverInstance Instance of a command resolver class
+ * @return void
+ */
+ public final function setResolverInstance (CommandResolver $resolverInstance) {
+ $this->resolverInstance = $resolverInstance;
+ }
+
+ /**
+ * Getter for resolver instance
+ *
+ * @return $resolverInstance Instance of a command resolver class
+ */
+ public final function getResolverInstance () {
+ return $this->resolverInstance;
+ }
}
// [EOF]
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A command for the "home" page
+ *
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class LocalHomeCommand extends BaseCommand implements Commandable {
+ /**
+ * Private constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set special description
+ $this->setObjectDescription("Home-Command");
+
+ // Create unique ID number
+ $this->createUniqueID();
+
+ // Clean up a little
+ $this->removeSystemArray();
+
+ // Set assigned controller
+ $this->setControllerName("default");
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @param $resolverInstance An instance of a command resolver class
+ * @return $commandInstance An instance a prepared command class
+ */
+ public final static function createLocalHomeCommand (CommandResolver $resolverInstance) {
+ // Get new instance
+ $commandInstance = new LocalHomeCommand();
+
+ // Set the application instance
+ $commandInstance->setResolverInstance($resolverInstance);
+
+ // Return the prepared instance
+ return $commandInstance;
+ }
+
+ /**
+ * Executes the given command with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get the application instance
+ $appInstance = $this->getResolverInstance()->getApplicationInstance();
+
+ // Prepare a template instance
+ $templateInstance = $this->prepareTemplateEngine($appInstance);
+
+ // Load the master template
+ $masterTemplate = $appInstance->getMasterTemplate();
+
+ // Load the master template
+ $templateInstance->loadCodeTemplate($masterTemplate);
+
+ // Load the home template
+ $templateInstance->loadWebTemplate("home");
+ }
+}
+
+// [EOF]
+?>
* BZIP2 compression and decompression class
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* GZIP compression and decompression class
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Null compression and decompression class
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* This class contains static helper functions for console applications
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A generic controller class
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* @return void
*/
- protected function __construct () {
+ protected function __construct ($class) {
// Call parent constructor
- parent::__construct(__CLASS__);
+ parent::__construct($class);
// Clean up a little
$this->removeNumberFormaters();
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * The default controller for all other requests
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class DefaultController extends BaseController implements Controller {
+ /**
+ * Instance of a CommandResolver class
+ */
+ private $resolverInstance = null;
+
+ /**
+ * Private constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set part description
+ $this->setObjectDescription("Standart-Controller für alle übrigen Anfragen");
+
+ // Create unique ID number
+ $this->createUniqueID();
+
+ // Clean up a little
+ $this->removeSystemArray();
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @param $resolverInstance An instance of a command resolver class
+ * @return $controllerInstance A prepared instance of this class
+ */
+ public final static function createDefaultController (CommandResolver $resolverInstance) {
+ // Create the instance
+ $controllerInstance = new DefaultController();
+
+ // Set the command resolver
+ $controllerInstance->setResolverInstance($resolverInstance);
+
+ // Return the prepared instance
+ return $controllerInstance;
+ }
+
+ /**
+ * Setter for a command resolver instance
+ *
+ * @param $resolverInstance An instance of a command resolver class
+ * @return void
+ */
+ public final function setResolverInstance (CommandResolver $resolverInstance) {
+ $this->resolverInstance = $resolverInstance;
+ }
+
+ /**
+ * Handles the given request and response
+ *
+ * @param $requestInstance An instance of a request class
+ * @param $responseInstance An instance of a response class
+ * @return void
+ */
+ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get the command instance
+ $commandInstance = $this->resolverInstance->resolvCommandByRequest($requestInstance);
+
+ // Execute the command
+ $commandInstance->execute($requestInstance, $responseInstance);
+
+ // Flush the response out
+ $responseInstance->flushResponse();
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A default registration controller which is suitable for most applications
+ * with a registration form.
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class DefaultRegistrationController extends BaseController implements Controller {
+ /**
+ * Private constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set part description
+ $this->setObjectDescription("Ein Standart-Anmelde-Controller");
+
+ // Create unique ID number
+ $this->createUniqueID();
+
+ // Clean up a little
+ $this->removeSystemArray();
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $controllerInstance A prepared instance of this class
+ */
+ public final static function createDefaultRegistrationController () {
+ // Create the instance
+ $controllerInstance = new DefaultRegistrationController();
+
+ // Return the prepared instance
+ return $controllerInstance;
+ }
+
+ /**
+ * Handles the given request and response
+ *
+ * @param $requestInstance An instance of a request class
+ * @param $responseInstance An instance of a response class
+ * @return void
+ */
+ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+ die(__METHOD__.": Stub!");
+ }
+}
+
+// [EOF]
+?>
*
* @see DatabaseFrontendInterface - An interface for database frontends (front-end to the application)
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* This class serializes objects and saves them to local files.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A debug output class for the console (e.g. hub software)
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A debug output class for PHP's error_log() command
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A debug output class for the web browser
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* objects to the datatabase connection or else a lot heap would be saved.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* other classes
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An universal class for file input/output streams.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A class for directory reading and getting its contents
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A class for reading files
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A class for writing files
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* application and whole framework
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* for console output
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* browser
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* A concrete HTTP request class to make HTTP requests more abstract
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A generic resolver class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class BaseResolver extends BaseFrameworkSystem {
+ /**
+ * Validated command name
+ */
+ private $commandName = "";
+
+ /**
+ * Prefix for local, remote or other resolver
+ */
+ private $commandPrefix = "";
+
+ /**
+ * Private constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Clean up a little
+ $this->removeSystemArray();
+ }
+
+ /**
+ * Setter for command name
+ *
+ * @param $commandName Last validated command name
+ * @return void
+ */
+ protected final function setCommandName ($commandName) {
+ $this->commandName = $commandName;
+ }
+
+ /**
+ * Getter for command name
+ *
+ * @return $commandName Last validated command name
+ */
+ protected final function getCommandName () {
+ return $this->commandName;
+ }
+
+ /**
+ * Setter for command prefix
+ *
+ * @param $commandPrefix Last validated commandPrefix
+ * @return void
+ */
+ protected final function setCommandPrefix ($commandPrefix) {
+ $this->commandPrefix = $commandPrefix;
+ }
+
+ /**
+ * Checks wether the given command is valid
+ *
+ * @param $commandName The default command we shall execute
+ * @return $isValid Wether the given command is valid
+ * @throws EmptyVariableException Thrown if the given command is not set
+ */
+ public function isCommandValid ($commandName) {
+ // By default nothing shall be valid
+ $isValid = false;
+
+ // Is a command set?
+ if (empty($commandName)) {
+ // Then thrown an exception here
+ throw new EmptyVariableException(array($this, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+ }
+
+ // Now, let us create the full name of the command class
+ $class = sprintf("%s%sCommand",
+ $this->commandPrefix,
+ ucfirst(strtolower($commandName))
+ );
+
+ // Is this class already loaded?
+ if (class_exists($class)) {
+ // This class does exist. :-)
+ $isValid = true;
+ }
+
+ // Set command name
+ $this->setCommandName($commandName);
+
+ // Return the result
+ return $isValid;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A command resolver for local (non-hubbed) commands
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class LocalCommandResolver extends BaseResolver implements CommandResolver {
+ /**
+ * Last successfull resolved command
+ */
+ private $lastCommandInstance = "";
+
+ /**
+ * Private constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set part description
+ $this->setObjectDescription("Lokaler Kommandoauflöser");
+
+ // Create unique ID number
+ $this->createUniqueID();
+
+ // Clean up a little
+ $this->removeNumberFormaters();
+ $this->removeSystemArray();
+
+ // Set prefix to "Local"
+ $this->setCommandPrefix("Local");
+ }
+
+ /**
+ * Creates an instance of a local command resolver with a given default command
+ *
+ * @param $defaultCommand The default command we shall execute
+ * @param $appInstance An instance of a manageable application helper class
+ * @return $resolverInstance The prepared command resolver instance
+ * @throws EmptyVariableException Thrown if the default command is not set
+ * @throws InvalidCommandException Thrown if the default command is invalid
+ */
+ public final static function createLocalCommandResolver ($defaultCommand, ManageableApplication $appInstance) {
+ // Create the new instance
+ $resolverInstance = new LocalCommandResolver();
+
+ // Is the variable $defaultCommand set and the command is valid?
+ if (empty($defaultCommand)) {
+ // Then thrown an exception here
+ throw new EmptyVariableException(array($resolverInstance, 'defaultCommand'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+ } elseif (!$resolverInstance->isCommandValid($defaultCommand)) {
+ // Invalid command found
+ throw new InvalidCommandException(array($resolverInstance, $defaultCommand), self::EXCEPTION_INVALID_COMMAND);
+ }
+
+ // Set the application instance
+ $resolverInstance->setApplicationInstance($appInstance);
+
+ // Return the prepared instance
+ return $resolverInstance;
+ }
+
+ /**
+ * Returns an command instance for a given request class or null if
+ * MissingArrayElementsException was thrown
+ *
+ * @param $requestInstance An instance of a request class
+ * @return $commandInstance An instance of the resolved command
+ * @throws InvalidCommandException Thrown if $commandName is
+ * invalid
+ * @throws InvalidCommandInstanceException Thrown if $commandInstance
+ * is an invalid instance
+ */
+ public function resolvCommandByRequest (Requestable $requestInstance) {
+ // Init variables
+ $commandName = "";
+ $commandInstance = null;
+
+ // Test if the required parameter is set
+ try {
+ // This goes fine so let's resolv the command
+ $commandName = $requestInstance->getRequestElement($this->getConfigInstance()->readConfig("command_parameter"));
+
+ // Is the command empty? Then fall back to default command
+ if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig("default_command");
+
+ // Check if the command is valid
+ if (!$this->isCommandValid($commandName)) {
+ // This command is invalid!
+ throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
+ }
+
+ // Get the command
+ $commandInstance = $this->loadCommand($commandName);
+
+ // And validate it
+ if ((!is_object($commandInstance)) || (!$commandInstance instanceof Commandable)) {
+ // This command has an invalid instance!
+ throw new InvalidCommandInstanceException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
+ }
+
+ // Set last command
+ $this->lastCommandInstance = $commandInstance;
+ } catch (MissingArrayElementsException $e) {
+ // Just catch it here...
+ }
+
+ // Return the resolved command instance
+ return $commandInstance;
+ }
+
+ /**
+ * "Loads" a given command and instances it if not yet cached
+ *
+ * @param $commandName A command name we shall look for
+ * @return $commandInstance A loaded command instance
+ * @throws InvalidCommandException Thrown if even the default
+ * command class is missing (bad!)
+ */
+ private function loadCommand ($commandName) {
+ // Cache default command
+ $defaultCommand = $this->getConfigInstance()->readConfig("default_command");
+
+ // Init command instance
+ $commandInstance = null;
+
+ // Create command class name
+ $class = sprintf("Local%sCommand",
+ ucfirst(strtolower($commandName))
+ );
+
+ // Is this class loaded?
+ if (!class_exists($class)) {
+ // Class not found, so try the default one or throw exception
+ if ($commandName != $defaultCommand) {
+ // Try the default command
+ return $this->loadCommand($defaultCommand);
+ } else {
+ // Still not found?
+ throw new InvalidCommandException(array($this, $defaultCommand), self::EXCEPTION_INVALID_COMMAND);
+ }
+ }
+
+ // Initiate the command
+ $eval = sprintf("\$commandInstance = %s::create%s(\$this);",
+ $class,
+ $class
+ );
+
+ // Run the command
+ eval($eval);
+
+ // Is the instance valid?
+ if ((!is_object($commandInstance)) || (!$commandInstance instanceof Commandable)) {
+ // Something is wrong
+ $commandInstance = null;
+ }
+
+ // Return the result
+ return $commandInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A resolver for resolving controllers locally
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program 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 program 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/>.
+ */
+class LocalControllerResolver extends BaseResolver implements ControllerResolver {
+ /**
+ * Last successfull resolved controller
+ */
+ private $lastControllerName = "";
+
+ /**
+ * Private constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set part description
+ $this->setObjectDescription("");
+
+ // Create unique ID number
+ $this->createUniqueID();
+
+ // Clean up a little
+ $this->removeNumberFormaters();
+ $this->removeSystemArray();
+
+ // Set prefix to "Local"
+ $this->setCommandPrefix("Local");
+ }
+
+ /**
+ * Creates an instance of a resolver class with a given command
+ *
+ * @param $commandName The default command we shall execute
+ * @param $appInstance An instance of a manageable application helper class
+ * @return $resolverInstance The prepared command resolver instance
+ * @throws EmptyVariableException Thrown if the default command is not set
+ * @throws InvalidCommandException Thrown if the default command is invalid
+ */
+ public final static function createLocalControllerResolver ($commandName, ManageableApplication $appInstance) {
+ // Create the new instance
+ $resolverInstance = new LocalControllerResolver();
+
+ // Is the variable $commandName set and the command is valid?
+ if (empty($commandName)) {
+ // Then thrown an exception here
+ throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+ } elseif (!$resolverInstance->isCommandValid($commandName)) {
+ // Invalid command found
+ throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
+ }
+
+ // Set the application instance
+ $resolverInstance->setApplicationInstance($appInstance);
+
+ // Return the prepared instance
+ return $resolverInstance;
+ }
+
+ /**
+ * Resolves the default controller of the given command
+ *
+ * @return $controllerInstance A controller instance for the default
+ * command
+ * @throws InvalidCommandException Thrown if $commandName is
+ * invalid
+ * @throws InvalidControllerInstanceException Thrown if $commandInstance
+ * is invalid
+ */
+ public function resolveDefaultController () {
+ // Init variables
+ $commandName = "";
+ $controllerInstance = null;
+
+ // Try to resolv the command
+ try {
+ // Get the command name
+ $commandName = $this->getCommandName();
+
+ // Check if the command is valid
+ if (!$this->isCommandValid($commandName)) {
+ // This command is invalid!
+ throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
+ }
+
+ // Get the command
+ $controllerInstance = $this->loadController($commandName);
+
+ // And validate it
+ if ((!is_object($controllerInstance)) || (!$controllerInstance instanceof Controller)) {
+ // This command has an invalid instance!
+ throw new InvalidControllerInstanceException(array($this, $commandName), self::EXCEPTION_INVALID_CONTROLLER);
+ }
+
+ // Set last command
+ $this->lastCommandInstance = $controllerInstance;
+ } catch (MissingArrayElementsException $e) {
+ // Just catch it here...
+ }
+
+ // Return the maybe resolved instance
+ return $controllerInstance;
+ }
+
+ /**
+ * "Loads" a given controller and instances it if not yet cached
+ *
+ * @param $commandName A controller name we shall look for
+ * @return $controllerInstance A loaded controller instance
+ * @throws DefaultControllerException Thrown if even the default
+ * controller class is missing (bad!)
+ */
+ private function loadController ($commandName) {
+ // Cache default command
+ $defaultCommand = $this->getConfigInstance()->readConfig("default_command");
+
+ // Init controller instance
+ $controllerInstance = null;
+
+ // Default controller
+ $class = "DefaultController";
+
+ // Generate the class name
+ if ($commandName != $defaultCommand) {
+ // Create controller class name
+ $class = sprintf("Local%sController",
+ ucfirst(strtolower($commandName))
+ );
+ }
+
+ // Is this class loaded?
+ if (!class_exists($class)) {
+ // Class not found, so try the default one or throw exception
+ if ($commandName != $defaultCommand) {
+ // Try the default controller
+ return $this->loadController($defaultCommand);
+ } else {
+ // Still not found?
+ throw new DefaultControllerException($this, self::EXCEPTION_DEFAUL_CONTROLLER_GONE);
+ }
+ }
+
+ // Initiate the controller
+ $eval = sprintf("\$controllerInstance = %s::create%s(LocalCommandResolver::createLocalCommandResolver(\$commandName, \$this->getApplicationInstance()));",
+ $class,
+ $class
+ );
+
+ // Run the command
+ eval($eval);
+
+ // Is the instance valid?
+ if ((!is_object($controllerInstance)) || (!$controllerInstance instanceof Controller)) {
+ // Something is wrong
+ $controllerInstance = null;
+ }
+
+ // Return the result
+ return $controllerInstance;
+ }
+}
+
+// [EOF]
+?>
* A class for an HTTP response on an HTTP request
*
* @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
private $responseBody = "";
+ /**
+ * Instance of the template engine
+ */
+ private $templateEngine = null;
+
/**
* Protected constructor
*
/**
* Creates an object of this class
*
+ * @param $appInstance An instance of a manageable application
* @return $responseInstance A prepared instance of this class
*/
- public final static function createHttpResponse () {
+ public final static function createHttpResponse (ManageableApplication $appInstance) {
// Get a new instance
$responseInstance = new HttpResponse();
+ // Initialize the template engine here
+ $responseInstance->initTemplateEngine($appInstance);
+
// Return the prepared instance
return $responseInstance;
}
* @throws ResponseHeadersAlreadySentException Thrown if headers are
* already sent
*/
- public function flushResponse($force=false) {
+ public function flushResponse ($force=false) {
if ((headers_sent()) && (!$force)) {
// Headers are already sent!
throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
$this->reponseBody = "";
$this->responseHeaders = array();
}
+
+ /**
+ * Initializes the template engine instance
+ *
+ * @param $appInstance An instance of a manageable application
+ * @return void
+ */
+ public final function initTemplateEngine (ManageableApplication $appInstance) {
+ $this->templateEngine = $this->prepareTemplateEngine($appInstance);
+ }
+
+ /**
+ * Getter for the template engine instance
+ *
+ * @return $templateEngine An instance of the used template engine
+ */
+ public final function getTemplateEngine () {
+ return $this->templateEngine;
+ }
}
// [EOF]
* and emails.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* An abstract middleware class for all other middlware classes
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Middleware class for selecting the right compressor channel
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Database selector class
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* become deprecated soon.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Missing paths in writing process will be automatically created.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* configuration entries there.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// CFG: VERBOSE-LEVEL
$cfg->setConfigEntry("verbose_level", 0);
+// CFG: COMMAND-PARAMETER
+$cfg->setConfigEntry("command_parameter", "page");
+
// [EOF]
?>
*
* @see ClassLoader
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Initializes the database layer
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Initializes the local file database class
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* instances will we generated.
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Loads more include files by using the generic class loader
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Try to initializes the language system
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
*
* This class loads class include files with a specific prefix and suffix
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Initializes the output middleware layer
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* The application selector main include file
*
* @author Roland Haeder <webmaster@mxchange.org>
- * @version 0.3.0
+ * @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.mxchange.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
$content[message]
</div>
+ <div class="emergency_exit backtrace_box">
+ <div class="backtrace_header">
+ Backtrace:
+ </div>
+ <div class="backtrace_content">
+ $content[backtrace]
+ </div>
+ </div>
+
{?footer_msg:footer_msg="Please contact the support and supply the full above message, if you think you are not qualified to fix this problem."?}
/**
* A test case for the configuration sub system
*
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 0.0.0
+ * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @see http://www.phpunit.de
+ *
+ * This program 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 program 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/>.
*/
class ConfigTest extends PHPUnit_Framework_TestCase {
/**
if ($typeValid) {
DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> kann Schiffe vom Typ <strong>%s</strong> bauen.<br />\n",
$shipping->getCompanyName(),
- $contract->getShipInstance()->getPartDescr()
+ $contract->getShipInstance()->getObjectDescription()
));
} else {
DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> kann keine Schiffe vom Typ <strong>%s</strong> bauen!<br />\n",
$shipping->getCompanyName(),
- $contract->getShipInstance()->getPartDescr()
+ $contract->getShipInstance()->getObjectDescription()
));
exit;
}