application/ship-simu/main/actions/web/.htaccess -text
application/ship-simu/main/actions/web/class_WebShipSimuLogin -text
application/ship-simu/main/actions/web/class_WebShipSimuLoginCompanyAction.php -text
-application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentStartupHelpAction.php -text
-application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentTrainingAction.php -text
+application/ship-simu/main/actions/web/class_WebShipSimuLoginGovernmentStartupHelpAction.php -text
+application/ship-simu/main/actions/web/class_WebShipSimuLoginGovernmentTrainingAction.php -text
application/ship-simu/main/actions/web/class_WebShipSimuLoginLogoutAction.php -text
application/ship-simu/main/actions/web/class_WebShipSimuLoginProfileAction.php -text
application/ship-simu/main/actions/web/class_WebShipSimuLoginRefillAction.php -text
application/ship-simu/main/commands/web/class_WebShipsimuProfileCommand.php -text
application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php -text
application/ship-simu/main/commands/web/class_WebShipsimuUserLoginCommand.php -text
-application/ship-simu/main/commands/web/goverment/.htaccess -text
-application/ship-simu/main/commands/web/goverment/class_WebGovermentFailedStartupCommand.php -text
-application/ship-simu/main/commands/web/goverment/class_WebShipsimuGovermentStartupCommand.php -text
+application/ship-simu/main/commands/web/government/.htaccess -text
+application/ship-simu/main/commands/web/government/class_WebGovernmentFailedStartupCommand.php -text
+application/ship-simu/main/commands/web/government/class_WebShipsimuGovernmentStartupCommand.php -text
application/ship-simu/main/companies/.htaccess -text
application/ship-simu/main/companies/class_ShippingCompany.php -text
application/ship-simu/main/constructions/.htaccess -text
application/ship-simu/main/constructions/yards/class_Shipyard.php -text
application/ship-simu/main/controller/.htaccess -text
application/ship-simu/main/controller/web/.htaccess -text
-application/ship-simu/main/controller/web/class_WebGovermentFailedController.php -text
+application/ship-simu/main/controller/web/class_WebGovernmentFailedController.php -text
application/ship-simu/main/drives/.htaccess -text
application/ship-simu/main/drives/class_BaseDrive.php -text
application/ship-simu/main/drives/motor/.htaccess -text
application/ship-simu/main/filter/.htaccess -text
application/ship-simu/main/filter/class_ -text
application/ship-simu/main/filter/class_BaseShipSimuFilter.php -text
-application/ship-simu/main/filter/goverment/.htaccess -text
-application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php -text
-application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php -text
+application/ship-simu/main/filter/government/.htaccess -text
+application/ship-simu/main/filter/government/class_ShipSimuGovernmentPaysStartupHelpFilter.php -text
+application/ship-simu/main/filter/government/class_ShipSimuGovernmentPaysTrainingFilter.php -text
application/ship-simu/main/filter/page/.htaccess -text
application/ship-simu/main/filter/page/class_RefillPageFilter.php -text
application/ship-simu/main/filter/validator/.htaccess -text
application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php -text
application/ship-simu/main/filter/verifier/.htaccess -text
application/ship-simu/main/filter/verifier/class_BirthdayVerifierFilter.php -text
-application/ship-simu/main/goverment/.htaccess -text
-application/ship-simu/main/goverment/class_SimplifiedGoverment.php -text
+application/ship-simu/main/government/.htaccess -text
+application/ship-simu/main/government/class_SimplifiedGoverment.php -text
+application/ship-simu/main/government/class_SimplifiedGovernment.php -text
application/ship-simu/main/login/.htaccess -text
application/ship-simu/main/login/class_ShipSimuGuestLogin.php -text
application/ship-simu/main/login/class_ShipSimuUserLogin.php -text
application/ship-simu/main/registration/class_ShipSimuRegistration.php -text
application/ship-simu/main/resolver/.htaccess -text
application/ship-simu/main/resolver/web/.htaccess -text
-application/ship-simu/main/resolver/web/class_WebGovermentFailedCommandResolver.php -text
+application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php -text
application/ship-simu/main/ships/.htaccess -text
application/ship-simu/main/ships/class_BaseShip.php -text
application/ship-simu/main/ships/passenger/.htaccess -text
application/ship-simu/main/user/extended/class_ShipSimuMember.php -text
application/ship-simu/main/wrapper/.htaccess -text
application/ship-simu/main/wrapper/class_CompanyDatabaseWrapper.php -text
-application/ship-simu/main/wrapper/class_UserGovermentDatabaseWrapper.php -text
+application/ship-simu/main/wrapper/class_UserGovernmentDatabaseWrapper.php -text
application/ship-simu/starter.php -text
application/ship-simu/templates/.htaccess -text
application/ship-simu/templates/de/.htaccess -text
application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp -text
-application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp -text
-application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp -text
+application/ship-simu/templates/de/code/action_ship_simu_login_government_startup_help.ctp -text
+application/ship-simu/templates/de/code/action_ship_simu_login_government_training.ctp -text
application/ship-simu/templates/de/code/action_ship_simu_login_logout.ctp -text
application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp -text
application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp -text
$cfg->setConfigEntry('payment_discovery_filter', "PaymentDiscoveryFilter");
// CFG: GOVERMENT-PAYS-TRAINING-FILTER
-$cfg->setConfigEntry('goverment_pays_training_filter', "ShipSimuGovermentPaysTrainingFilter");
+$cfg->setConfigEntry('goverment_pays_training_filter', "ShipSimuGovernmentPaysTrainingFilter");
// CFG: GOVERMENT-PAYS-STARTUP-HELP-FILTER
-$cfg->setConfigEntry('goverment_pays_startup_help_filter', "ShipSimuGovermentPaysStartupHelpFilter");
+$cfg->setConfigEntry('goverment_pays_startup_help_filter', "ShipSimuGovernmentPaysStartupHelpFilter");
// CFG: NEWS-HOME-LIMIT
$cfg->setConfigEntry('news_home_limit', 10);
$cfg->setConfigEntry('user_points_db_wrapper_class', "UserPointsDatabaseWrapper");
// CFG: USER-GOVERMENT-WRAPPER-CLASS
-$cfg->setConfigEntry('user_gov_wrapper_class', "UserGovermentDatabaseWrapper");
+$cfg->setConfigEntry('user_gov_wrapper_class', "UserGovernmentDatabaseWrapper");
// CFG: PAYMENT-DB-WRAPPER-CLASS
$cfg->setConfigEntry('payment_db_wrapper_class', "PaymentsDatabaseWrapper");
$cfg->setConfigEntry('user_ppints_class', "UserPoints");
// CFG: GOVERMENT-CLASS
-$cfg->setConfigEntry('goverment_class', "SimplifiedGoverment");
+$cfg->setConfigEntry('goverment_class', "SimplifiedGovernment");
// CFG: BANK-CLASS
$cfg->setConfigEntry('bank_class', "MoneyBank");
$cfg->setConfigEntry('web_link_helper', "WebLinkHelper");
// CFG: WEB-CMD-GOVERMENT-FAILED-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_goverment_failed_resolver_class', "WebGovermentFailedCommandResolver");
+$cfg->setConfigEntry('web_cmd_goverment_failed_resolver_class', "WebGovernmentFailedCommandResolver");
// [EOF]
?>
+++ /dev/null
-<?php
-/**
- * An action for goverment startup help 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 WebShipSimuLoginGovermentStartupHelpAction extends BaseShipSimuAction implements Commandable, Registerable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this action
- *
- * @param $resolverInstance An instance of an action resolver
- * @return $actionInstance An instance of this action class
- */
- public final static function createWebShipSimuLoginGovermentStartupHelpAction (ActionResolver $resolverInstance) {
- // Get a new instance
- $actionInstance = new WebShipSimuLoginGovermentStartupHelpAction();
-
- // Set the resolver instance
- $actionInstance->setResolverInstance($resolverInstance);
-
- // Return the instance
- return $actionInstance;
- }
-
- /**
- * Executes the 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
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Call parent execute method
- parent::execute($requestInstance, $responseInstance);
-
- // Add your code here...
- }
-
- /**
- * Adds extra filters to the given controller instance
- *
- * @param $controllerInstance A controller instance
- * @param $requestInstance An instance of a class with an Requestable interface
- * @return void
- * @todo Add some filters here
- */
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
- // Check for user status by default
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
-
- // Check if goverment can pay startup help
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_startup_help_filter'));
- }
-}
-
-// [EOF]
-?>
+++ /dev/null
-<?php
-/**
- * An action for trainings payed by goverment
- *
- * @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 WebShipSimuLoginGovermentTrainingAction extends BaseShipSimuAction implements Commandable, Registerable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this action
- *
- * @param $resolverInstance An instance of an action resolver
- * @return $actionInstance An instance of this action class
- */
- public final static function createWebShipSimuLoginGovermentTrainingAction (ActionResolver $resolverInstance) {
- // Get a new instance
- $actionInstance = new WebShipSimuLoginGovermentTrainingAction();
-
- // Set the resolver instance
- $actionInstance->setResolverInstance($resolverInstance);
-
- // Return the instance
- return $actionInstance;
- }
-
- /**
- * Executes the 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
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Call parent execute method
- parent::execute($requestInstance, $responseInstance);
-
- // Add your code here...
- }
-
- /**
- * Adds extra filters to the given controller instance
- *
- * @param $controllerInstance A controller instance
- * @param $requestInstance An instance of a class with an Requestable interface
- * @return void
- * @todo Add some more filters here
- */
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
- // Check for user status by default
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
-
- // Check if goverment can pay a training
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_training_filter'));
- }
-}
-
-// [EOF]
-?>
--- /dev/null
+<?php
+/**
+ * An action for goverment startup help 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 WebShipSimuLoginGovermentStartupHelpAction extends BaseShipSimuAction implements Commandable, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this action
+ *
+ * @param $resolverInstance An instance of an action resolver
+ * @return $actionInstance An instance of this action class
+ */
+ public final static function createWebShipSimuLoginGovermentStartupHelpAction (ActionResolver $resolverInstance) {
+ // Get a new instance
+ $actionInstance = new WebShipSimuLoginGovermentStartupHelpAction();
+
+ // Set the resolver instance
+ $actionInstance->setResolverInstance($resolverInstance);
+
+ // Return the instance
+ return $actionInstance;
+ }
+
+ /**
+ * Executes the 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
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Call parent execute method
+ parent::execute($requestInstance, $responseInstance);
+
+ // Add your code here...
+ }
+
+ /**
+ * Adds extra filters to the given controller instance
+ *
+ * @param $controllerInstance A controller instance
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @return void
+ * @todo Add some filters here
+ */
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ // Check for user status by default
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
+
+ // Check if goverment can pay startup help
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_startup_help_filter'));
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * An action for trainings payed by goverment
+ *
+ * @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 WebShipSimuLoginGovermentTrainingAction extends BaseShipSimuAction implements Commandable, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this action
+ *
+ * @param $resolverInstance An instance of an action resolver
+ * @return $actionInstance An instance of this action class
+ */
+ public final static function createWebShipSimuLoginGovermentTrainingAction (ActionResolver $resolverInstance) {
+ // Get a new instance
+ $actionInstance = new WebShipSimuLoginGovermentTrainingAction();
+
+ // Set the resolver instance
+ $actionInstance->setResolverInstance($resolverInstance);
+
+ // Return the instance
+ return $actionInstance;
+ }
+
+ /**
+ * Executes the 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
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Call parent execute method
+ parent::execute($requestInstance, $responseInstance);
+
+ // Add your code here...
+ }
+
+ /**
+ * Adds extra filters to the given controller instance
+ *
+ * @param $controllerInstance A controller instance
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @return void
+ * @todo Add some more filters here
+ */
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ // Check for user status by default
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
+
+ // Check if goverment can pay a training
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_training_filter'));
+ }
+}
+
+// [EOF]
+?>
+++ /dev/null
-Deny from all
+++ /dev/null
-<?php
-/**
- * A command for a failed startup request. This may happen when the user
- * "knows" the correct URL but goverment refuses to pay.
- *
- * @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 WebGovermentFailedStartupCommand extends BaseCommand implements Commandable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * 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 createWebGovermentFailedStartupCommand (CommandResolver $resolverInstance) {
- // Get new instance
- $commandInstance = new WebGovermentFailedStartupCommand();
-
- // 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
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- $this->partialStub("Unfinished method.");
- }
-
- /**
- * Adds extra filters to the given controller instance
- *
- * @param $controllerInstance A controller instance
- * @param $requestInstance An instance of a class with an Requestable interface
- * @return void
- * @todo Maybe we need some filters here?
- */
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
- // Empty for now
- }
-}
-
-// [EOF]
-?>
+++ /dev/null
-<?php
-/**
- * A command for a failed startup request. This may happen when the user
- * "knows" the correct URL but goverment refuses to pay.
- *
- * @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 WebShipsimuGovermentStartupCommand extends BaseCommand implements Commandable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * 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 createWebShipsimuGovermentStartupCommand (CommandResolver $resolverInstance) {
- // Get new instance
- $commandInstance = new WebShipsimuGovermentStartupCommand();
-
- // 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
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- $this->partialStub("Unfinished method.");
- }
-
- /**
- * Adds extra filters to the given controller instance
- *
- * @param $controllerInstance A controller instance
- * @param $requestInstance An instance of a class with an Requestable interface
- * @return void
- * @todo Maybe we need some filters here?
- */
- public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
- // Add user auth filter (we don't need an update of the user here because it will be redirected)
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
-
- // Add user status filter here
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
-
- // Check if goverment can pay startup help
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_startup_help_filter'));
-
- // Verify password
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter'));
-
- // Verify CAPTCHA code
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter'));
- }
-}
-
-// [EOF]
-?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A command for a failed startup request. This may happen when the user
+ * "knows" the correct URL but goverment refuses to pay.
+ *
+ * @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 WebGovermentFailedStartupCommand extends BaseCommand implements Commandable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * 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 createWebGovermentFailedStartupCommand (CommandResolver $resolverInstance) {
+ // Get new instance
+ $commandInstance = new WebGovermentFailedStartupCommand();
+
+ // 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
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ $this->partialStub("Unfinished method.");
+ }
+
+ /**
+ * Adds extra filters to the given controller instance
+ *
+ * @param $controllerInstance A controller instance
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @return void
+ * @todo Maybe we need some filters here?
+ */
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ // Empty for now
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A command for a failed startup request. This may happen when the user
+ * "knows" the correct URL but goverment refuses to pay.
+ *
+ * @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 WebShipsimuGovermentStartupCommand extends BaseCommand implements Commandable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * 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 createWebShipsimuGovermentStartupCommand (CommandResolver $resolverInstance) {
+ // Get new instance
+ $commandInstance = new WebShipsimuGovermentStartupCommand();
+
+ // 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
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ $this->partialStub("Unfinished method.");
+ }
+
+ /**
+ * Adds extra filters to the given controller instance
+ *
+ * @param $controllerInstance A controller instance
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @return void
+ * @todo Maybe we need some filters here?
+ */
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ // Add user auth filter (we don't need an update of the user here because it will be redirected)
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
+
+ // Add user status filter here
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
+
+ // Check if goverment can pay startup help
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('goverment_pays_startup_help_filter'));
+
+ // Verify password
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter'));
+
+ // Verify CAPTCHA code
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter'));
+ }
+}
+
+// [EOF]
+?>
+++ /dev/null
-<?php
-/**
- * Controller for failed goverment 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 WebGovermentFailedController extends BaseController implements Controller {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this class
- *
- * @param $resolverInstance An instance of a command resolver class
- * @return $controllerInstance A prepared instance of this class
- * @todo Add some filters to this controller
- */
- public final static function createWebGovermentFailedController (CommandResolver $resolverInstance) {
- // Create the instance
- $controllerInstance = new WebGovermentFailedController();
-
- // Set the command resolver
- $controllerInstance->setResolverInstance($resolverInstance);
-
- // User auth filter
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
-
- // User update filter
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter'));
-
- // News fetcher filter
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter'));
-
- // News proccess/display-preparation
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter'));
-
- // 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) {
- // Get the command instance from the resolver by sending a request instance to the resolver
- $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
-
- // Add more filters by the command
- $commandInstance->addExtraFilters($this, $requestInstance);
-
- // Try to run the pre filters, if auth exceptions come through redirect here
- try {
- // Run the pre filters
- $this->executePreFilters($requestInstance, $responseInstance);
- } catch (UserAuthorizationException $e) {
- // Redirect to main page
- $responseInstance->redirectToConfiguredUrl('login_failed_url');
-
- // Exit here
- exit();
- }
-
- // This request was valid! :-D
- $requestInstance->requestIsValid();
-
- // Execute the command
- $commandInstance->execute($requestInstance, $responseInstance);
-
- // Run the pre filters
- $this->executePostFilters($requestInstance, $responseInstance);
-
- // Flush the response out
- $responseInstance->flushBuffer();
- }
-}
-
-// [EOF]
-?>
--- /dev/null
+<?php
+/**
+ * Controller for failed goverment 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 WebGovermentFailedController extends BaseController implements Controller {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @param $resolverInstance An instance of a command resolver class
+ * @return $controllerInstance A prepared instance of this class
+ * @todo Add some filters to this controller
+ */
+ public final static function createWebGovermentFailedController (CommandResolver $resolverInstance) {
+ // Create the instance
+ $controllerInstance = new WebGovermentFailedController();
+
+ // Set the command resolver
+ $controllerInstance->setResolverInstance($resolverInstance);
+
+ // User auth filter
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
+
+ // User update filter
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter'));
+
+ // News fetcher filter
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter'));
+
+ // News proccess/display-preparation
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter'));
+
+ // 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) {
+ // Get the command instance from the resolver by sending a request instance to the resolver
+ $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
+
+ // Add more filters by the command
+ $commandInstance->addExtraFilters($this, $requestInstance);
+
+ // Try to run the pre filters, if auth exceptions come through redirect here
+ try {
+ // Run the pre filters
+ $this->executePreFilters($requestInstance, $responseInstance);
+ } catch (UserAuthorizationException $e) {
+ // Redirect to main page
+ $responseInstance->redirectToConfiguredUrl('login_failed_url');
+
+ // Exit here
+ exit();
+ }
+
+ // This request was valid! :-D
+ $requestInstance->requestIsValid();
+
+ // Execute the command
+ $commandInstance->execute($requestInstance, $responseInstance);
+
+ // Run the pre filters
+ $this->executePostFilters($requestInstance, $responseInstance);
+
+ // Flush the response out
+ $responseInstance->flushBuffer();
+ }
+}
+
+// [EOF]
+?>
+++ /dev/null
-Deny from all
+++ /dev/null
-<?php
-/**
- * A filter for checking if goverment can pay startup helps
- *
- * @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 ShipSimuGovermentPaysStartupHelpFilter extends BaseShipSimuFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public final static function createShipSimuGovermentPaysStartupHelpFilter () {
- // Get a new instance
- $filterInstance = new ShipSimuGovermentPaysStartupHelpFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter 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
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Execute the parent execute method
- parent::execute($requestInstance, $responseInstance);
-
- // Get the user instance from registry
- $userInstance = Registry::getRegistry()->getInstance('user');
-
- // Now simply check for it
- if ((!$userInstance instanceof ManageableMember) || ($userInstance->ifGovermentPaysStartupHelp() === false)) {
- // Request is invalid
- $requestInstance->requestIsValid(false);
-
- // Redirect to configured URL
- $responseInstance->redirectToConfiguredUrl('login_goverment_startup_failed_url');
-
- // Stop processing here
- exit();
- } // END - if
- }
-}
-
-// [EOF]
-?>
+++ /dev/null
-<?php
-/**
- * A filter for checking if goverment can pay a training for current user
- *
- * @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 ShipSimuGovermentPaysTrainingFilter extends BaseShipSimuFilter implements Filterable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this filter class
- *
- * @return $filterInstance An instance of this filter class
- */
- public final static function createShipSimuGovermentPaysTrainingFilter () {
- // Get a new instance
- $filterInstance = new ShipSimuGovermentPaysTrainingFilter();
-
- // Return the instance
- return $filterInstance;
- }
-
- /**
- * Executes the filter 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
- * @todo 0% done
- */
- public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- // Execute the parent execute method
- parent::execute($requestInstance, $responseInstance);
-
- // Get the user instance from registry
- $userInstance = Registry::getRegistry()->getInstance('user');
-
- // Now simply check for it
- if ((!$userInstance instanceof ManageableMember) || ($userInstance->ifGovermentPaysTraining() === false)) {
- // Request is invalid
- $requestInstance->requestIsValid(false);
-
- // Redirect to configured URL
- $responseInstance->redirectToConfiguredUrl('login_goverment_training_failed_url');
-
- // Stop processing here
- exit();
- } // END - if
- }
-}
-
-// [EOF]
-?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A filter for checking if goverment can pay startup helps
+ *
+ * @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 ShipSimuGovermentPaysStartupHelpFilter extends BaseShipSimuFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createShipSimuGovermentPaysStartupHelpFilter () {
+ // Get a new instance
+ $filterInstance = new ShipSimuGovermentPaysStartupHelpFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter 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
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Execute the parent execute method
+ parent::execute($requestInstance, $responseInstance);
+
+ // Get the user instance from registry
+ $userInstance = Registry::getRegistry()->getInstance('user');
+
+ // Now simply check for it
+ if ((!$userInstance instanceof ManageableMember) || ($userInstance->ifGovermentPaysStartupHelp() === false)) {
+ // Request is invalid
+ $requestInstance->requestIsValid(false);
+
+ // Redirect to configured URL
+ $responseInstance->redirectToConfiguredUrl('login_goverment_startup_failed_url');
+
+ // Stop processing here
+ exit();
+ } // END - if
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A filter for checking if goverment can pay a training for current user
+ *
+ * @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 ShipSimuGovermentPaysTrainingFilter extends BaseShipSimuFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createShipSimuGovermentPaysTrainingFilter () {
+ // Get a new instance
+ $filterInstance = new ShipSimuGovermentPaysTrainingFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter 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
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Execute the parent execute method
+ parent::execute($requestInstance, $responseInstance);
+
+ // Get the user instance from registry
+ $userInstance = Registry::getRegistry()->getInstance('user');
+
+ // Now simply check for it
+ if ((!$userInstance instanceof ManageableMember) || ($userInstance->ifGovermentPaysTraining() === false)) {
+ // Request is invalid
+ $requestInstance->requestIsValid(false);
+
+ // Redirect to configured URL
+ $responseInstance->redirectToConfiguredUrl('login_goverment_training_failed_url');
+
+ // Stop processing here
+ exit();
+ } // END - if
+ }
+}
+
+// [EOF]
+?>
+++ /dev/null
-Deny from all
+++ /dev/null
-<?php
-/**
- * A goverment class with simplified ways...
- *
- * @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
- * @todo Find an interface for goverments
- *
- * 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 SimplifiedGoverment extends BaseFrameworkSystem implements Registerable {
- // Constants
- const STATUS_STARTER_HELP = "STARTER_HELP";
-
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Clean up a little
- $this->removeSystemArray();
- $this->removeNumberFormaters();
- }
-
- /**
- * Creates an instance of this goverment class by given user instance
- *
- * @param $userInstance The user instance
- * @return $govermentInstance Instance of the prepared goverment instance
- */
- public final static function createSimplifiedGoverment (ManageableAccount $userInstance) {
- // Get a new instance
- $govermentInstance = new SimplifiedGoverment();
-
- // Set the user instance
- $govermentInstance->setUserInstance($userInstance);
-
- // Return the prepared instance
- return $govermentInstance;
- }
-
- /**
- * Checks wether the goverment has already payed a training course for te
- * current user
- *
- * @return $alreadyPayed Wether the goverment has already payed
- */
- public function ifGovermentAlreadyPayedTraining () {
- // Default is not payed
- $alreadyPayed = false;
-
- // Now get a search criteria and set the user's name as criteria
- $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
- $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId());
- $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
- $criteriaInstance->setLimit(1);
-
- // Get a wrapper instance
- $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class');
-
- // Get result back
- $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
-
- // Was the query fine?
- if ($resultInstance->getAffectedRows() === 1) {
- // Entry was found so the goverment can no more pay a training
- $alreadyPayed = true;
- } // END - if
-
- // Return the result
- return $alreadyPayed;
- }
-
- /**
- * Checks wether the goverment has payed maximum of startup helps to the
- * current user
- *
- * @return $maximumPayed Wether the goverment has already payed
- */
- public function ifGovermentPayedMaxmimumStartupHelp () {
- // Default is not payed
- $maximumPayed = false;
-
- // Cache startup help limit
- $helpLimit = $this->getConfigInstance()->readConfig('goverment_startup_help_limit');
-
- // Now get a search criteria and set the user's name as criteria
- $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
- $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId());
- $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
- $criteriaInstance->setLimit($helpLimit);
-
- // Get a wrapper instance
- $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class');
-
- // Get result back
- $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
-
- // Was the query fine?
- if ($resultInstance->getAffectedRows() === $helpLimit) {
- // Entry found, so lets have a look if this goverment wants to again...
- $maximumPayed = true;
- } // END - if
-
- // Return the result
- return $maximumPayed;
- }
-}
-
-// [EOF]
-?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A goverment class with simplified ways...
+ *
+ * @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
+ * @todo Find an interface for goverments
+ *
+ * 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 SimplifiedGoverment extends BaseFrameworkSystem implements Registerable {
+ // Constants
+ const STATUS_STARTER_HELP = "STARTER_HELP";
+
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Clean up a little
+ $this->removeSystemArray();
+ $this->removeNumberFormaters();
+ }
+
+ /**
+ * Creates an instance of this goverment class by given user instance
+ *
+ * @param $userInstance The user instance
+ * @return $govermentInstance Instance of the prepared goverment instance
+ */
+ public final static function createSimplifiedGoverment (ManageableAccount $userInstance) {
+ // Get a new instance
+ $govermentInstance = new SimplifiedGoverment();
+
+ // Set the user instance
+ $govermentInstance->setUserInstance($userInstance);
+
+ // Return the prepared instance
+ return $govermentInstance;
+ }
+
+ /**
+ * Checks wether the goverment has already payed a training course for te
+ * current user
+ *
+ * @return $alreadyPayed Wether the goverment has already payed
+ */
+ public function ifGovermentAlreadyPayedTraining () {
+ // Default is not payed
+ $alreadyPayed = false;
+
+ // Now get a search criteria and set the user's name as criteria
+ $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+ $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId());
+ $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
+ $criteriaInstance->setLimit(1);
+
+ // Get a wrapper instance
+ $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class');
+
+ // Get result back
+ $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
+
+ // Was the query fine?
+ if ($resultInstance->getAffectedRows() === 1) {
+ // Entry was found so the goverment can no more pay a training
+ $alreadyPayed = true;
+ } // END - if
+
+ // Return the result
+ return $alreadyPayed;
+ }
+
+ /**
+ * Checks wether the goverment has payed maximum of startup helps to the
+ * current user
+ *
+ * @return $maximumPayed Wether the goverment has already payed
+ */
+ public function ifGovermentPayedMaxmimumStartupHelp () {
+ // Default is not payed
+ $maximumPayed = false;
+
+ // Cache startup help limit
+ $helpLimit = $this->getConfigInstance()->readConfig('goverment_startup_help_limit');
+
+ // Now get a search criteria and set the user's name as criteria
+ $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+ $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId());
+ $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
+ $criteriaInstance->setLimit($helpLimit);
+
+ // Get a wrapper instance
+ $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class');
+
+ // Get result back
+ $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
+
+ // Was the query fine?
+ if ($resultInstance->getAffectedRows() === $helpLimit) {
+ // Entry found, so lets have a look if this goverment wants to again...
+ $maximumPayed = true;
+ } // END - if
+
+ // Return the result
+ return $maximumPayed;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A goverment class with simplified ways...
+ *
+ * @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
+ * @todo Find an interface for goverments
+ *
+ * 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 SimplifiedGovernment extends BaseFrameworkSystem implements Registerable {
+ // Constants
+ const STATUS_STARTER_HELP = "STARTER_HELP";
+
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Clean up a little
+ $this->removeSystemArray();
+ $this->removeNumberFormaters();
+ }
+
+ /**
+ * Creates an instance of this goverment class by given user instance
+ *
+ * @param $userInstance The user instance
+ * @return $govermentInstance Instance of the prepared goverment instance
+ */
+ public final static function createSimplifiedGovernment (ManageableAccount $userInstance) {
+ // Get a new instance
+ $govermentInstance = new SimplifiedGovernment();
+
+ // Set the user instance
+ $govermentInstance->setUserInstance($userInstance);
+
+ // Return the prepared instance
+ return $govermentInstance;
+ }
+
+ /**
+ * Checks wether the goverment has already payed a training course for te
+ * current user
+ *
+ * @return $alreadyPayed Wether the goverment has already payed
+ */
+ public function ifGovernmentAlreadyPayedTraining () {
+ // Default is not payed
+ $alreadyPayed = false;
+
+ // Now get a search criteria and set the user's name as criteria
+ $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+ $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId());
+ $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
+ $criteriaInstance->setLimit(1);
+
+ // Get a wrapper instance
+ $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class');
+
+ // Get result back
+ $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
+
+ // Was the query fine?
+ if ($resultInstance->getAffectedRows() === 1) {
+ // Entry was found so the goverment can no more pay a training
+ $alreadyPayed = true;
+ } // END - if
+
+ // Return the result
+ return $alreadyPayed;
+ }
+
+ /**
+ * Checks wether the goverment has payed maximum of startup helps to the
+ * current user
+ *
+ * @return $maximumPayed Wether the goverment has already payed
+ */
+ public function ifGovernmentPayedMaxmimumStartupHelp () {
+ // Default is not payed
+ $maximumPayed = false;
+
+ // Cache startup help limit
+ $helpLimit = $this->getConfigInstance()->readConfig('goverment_startup_help_limit');
+
+ // Now get a search criteria and set the user's name as criteria
+ $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+ $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId());
+ $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
+ $criteriaInstance->setLimit($helpLimit);
+
+ // Get a wrapper instance
+ $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class');
+
+ // Get result back
+ $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
+
+ // Was the query fine?
+ if ($resultInstance->getAffectedRows() === $helpLimit) {
+ // Entry found, so lets have a look if this goverment wants to again...
+ $maximumPayed = true;
+ } // END - if
+
+ // Return the result
+ return $maximumPayed;
+ }
+}
+
+// [EOF]
+?>
+++ /dev/null
-<?php
-/**
- * A command resolver for local (non-hubbed) web commands including the failed goverment request
- *
- * @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 WebGovermentFailedCommandResolver extends BaseCommandResolver implements CommandResolver {
- /**
- * Last successfull resolved command
- */
- private $lastCommandInstance = null;
-
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
-
- // Set prefix to "Web"
- $this->setCommandPrefix("Web");
- }
-
- /**
- * Creates an instance of a Web command resolver with a given default 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 default command is not set
- * @throws InvalidInterfaceException Thrown if command does not implement interface Commandable
- */
- public final static function createWebGovermentFailedCommandResolver ($commandName, ManageableApplication $appInstance) {
- // Create the new instance
- $resolverInstance = new WebGovermentFailedCommandResolver();
-
- // Get request instance
- $requestInstance = $appInstance->getRequestInstance();
-
- // 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->resolveCommandByRequest($requestInstance) instanceof Commandable) {
- // Invalid command found (missing interface?)
- throw new InvalidInterfaceException(array($userInstance, 'ManageableMember'), self::EXCEPTION_REQUIRED_INTERFACE_MISSING);
- }
-
- // 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
- * it was not found
- *
- * @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 resolveCommandByRequest (Requestable $requestInstance) {
- // Init instance
- $commandInstance = null;
-
- // This goes fine so let's resolv the command
- $commandName = $requestInstance->getRequestElement('page');
-
- // Is there a "failed" request?
- if ($requestInstance->isRequestElementSet('failed')) {
- // Then include with within the command name
- $commandName = sprintf("%s_%s", $commandName, $requestInstance->getRequestElement('failed'));
- } // END - if
-
- // Is the command empty? Then fall back to default command
- if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
-
- // Check if command is valid
- if ($this->isCommandValid($commandName) === false) {
- // This command is invalid!
- throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
- } // END - if
-
- // 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);
- } // END - if
-
- // Set last command
- $this->lastCommandInstance = $commandInstance;
-
- // Return the resolved command instance
- return $commandInstance;
- }
-
- /**
- * Resolves the command by its direct name and returns an instance of its class
- *
- * @param $commandName The direct command name we shall resolve
- * @return $commandInstance An instance of the command class
- * @throws InvalidCommandException Thrown if $commandName is invalid
- */
- public function resolveCommand ($commandName) {
- // Initiate the instance variable
- $commandInstance = null;
-
- // Is the command empty? Then fall back to default command
- if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
-
- // Check if command is valid
- if ($this->isCommandValid($commandName) === false) {
- // This command is invalid!
- throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
- }
-
- // Get the command
- $commandInstance = $this->loadCommand($commandName);
-
- // Return the 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_web_command');
-
- // Init command instance
- $commandInstance = null;
-
- // Create command class name
- $this->setClassName(sprintf("Web%sCommand",
- $this->convertToClassName($commandName)
- ));
-
- // Is this class loaded?
- if (!class_exists($this->getClassName())) {
- // Class not found, so throw an exception
- throw new InvalidCommandException(array($this, $defaultCommand), self::EXCEPTION_INVALID_COMMAND);
- } // END - if
-
- // Initiate the command
- $commandInstance = ObjectFactory::createObjectByName($this->getClassName(), array($this));
-
- // Return the result
- return $commandInstance;
- }
-}
-
-// [EOF]
-?>
--- /dev/null
+<?php
+/**
+ * A command resolver for local (non-hubbed) web commands including the failed goverment request
+ *
+ * @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 WebGovermentFailedCommandResolver extends BaseCommandResolver implements CommandResolver {
+ /**
+ * Last successfull resolved command
+ */
+ private $lastCommandInstance = null;
+
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set prefix to "Web"
+ $this->setCommandPrefix("Web");
+ }
+
+ /**
+ * Creates an instance of a Web command resolver with a given default 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 default command is not set
+ * @throws InvalidInterfaceException Thrown if command does not implement interface Commandable
+ */
+ public final static function createWebGovermentFailedCommandResolver ($commandName, ManageableApplication $appInstance) {
+ // Create the new instance
+ $resolverInstance = new WebGovermentFailedCommandResolver();
+
+ // Get request instance
+ $requestInstance = $appInstance->getRequestInstance();
+
+ // 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->resolveCommandByRequest($requestInstance) instanceof Commandable) {
+ // Invalid command found (missing interface?)
+ throw new InvalidInterfaceException(array($userInstance, 'ManageableMember'), self::EXCEPTION_REQUIRED_INTERFACE_MISSING);
+ }
+
+ // 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
+ * it was not found
+ *
+ * @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 resolveCommandByRequest (Requestable $requestInstance) {
+ // Init instance
+ $commandInstance = null;
+
+ // This goes fine so let's resolv the command
+ $commandName = $requestInstance->getRequestElement('page');
+
+ // Is there a "failed" request?
+ if ($requestInstance->isRequestElementSet('failed')) {
+ // Then include with within the command name
+ $commandName = sprintf("%s_%s", $commandName, $requestInstance->getRequestElement('failed'));
+ } // END - if
+
+ // Is the command empty? Then fall back to default command
+ if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
+
+ // Check if command is valid
+ if ($this->isCommandValid($commandName) === false) {
+ // This command is invalid!
+ throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
+ } // END - if
+
+ // 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);
+ } // END - if
+
+ // Set last command
+ $this->lastCommandInstance = $commandInstance;
+
+ // Return the resolved command instance
+ return $commandInstance;
+ }
+
+ /**
+ * Resolves the command by its direct name and returns an instance of its class
+ *
+ * @param $commandName The direct command name we shall resolve
+ * @return $commandInstance An instance of the command class
+ * @throws InvalidCommandException Thrown if $commandName is invalid
+ */
+ public function resolveCommand ($commandName) {
+ // Initiate the instance variable
+ $commandInstance = null;
+
+ // Is the command empty? Then fall back to default command
+ if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
+
+ // Check if command is valid
+ if ($this->isCommandValid($commandName) === false) {
+ // This command is invalid!
+ throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
+ }
+
+ // Get the command
+ $commandInstance = $this->loadCommand($commandName);
+
+ // Return the 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_web_command');
+
+ // Init command instance
+ $commandInstance = null;
+
+ // Create command class name
+ $this->setClassName(sprintf("Web%sCommand",
+ $this->convertToClassName($commandName)
+ ));
+
+ // Is this class loaded?
+ if (!class_exists($this->getClassName())) {
+ // Class not found, so throw an exception
+ throw new InvalidCommandException(array($this, $defaultCommand), self::EXCEPTION_INVALID_COMMAND);
+ } // END - if
+
+ // Initiate the command
+ $commandInstance = ObjectFactory::createObjectByName($this->getClassName(), array($this));
+
+ // Return the result
+ return $commandInstance;
+ }
+}
+
+// [EOF]
+?>
*
* @return $ifGovHelps Wether if goverment helps the user with a virtual training course
*/
- public function ifGovermentPaysTraining () {
+ public function ifGovernmentPaysTraining () {
// By default they want to help.
$ifGovHelps = true;
} // END - if
// Then ask the goverment if they want to pay a "startup help" to the user
- if ($govermentInstance->ifGovermentAlreadyPayedTraining()) {
+ if ($govermentInstance->ifGovernmentAlreadyPayedTraining()) {
// Training already given!
$ifGovHelps = false;
} // END - if
*
* @return $ifGovHelps Wether if goverment helps the user with some startup money
*/
- public function ifGovermentPaysStartupHelp () {
+ public function ifGovernmentPaysStartupHelp () {
// By default they want to help.
$ifGovHelps = true;
} // END - if
// Then ask the goverment if they want to pay a "startup help" to the user
- if ($govermentInstance->ifGovermentPayedMaxmimumStartupHelp()) {
+ if ($govermentInstance->ifGovernmentPayedMaxmimumStartupHelp()) {
// They can't pay anymore to the user (excited amount)
$ifGovHelps = false;
} // END - if
+++ /dev/null
-<?php
-/**
- * A wrapper for database access to goverment->user data
- *
- * @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 UserGovermentDatabaseWrapper extends BaseDatabaseWrapper {
- // Constants for database tables
- const DB_TABLE_USER_GOVERMENT = "gov_user";
-
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this wrapper class
- *
- * @return $wrapperInstance An instance of this wrapper class
- */
- public final static function createUserGovermentDatabaseWrapper () {
- // Create a new instance
- $wrapperInstance = new UserGovermentDatabaseWrapper();
-
- // Set (primary!) table name
- $wrapperInstance->setTableName(self::DB_TABLE_USER_GOVERMENT);
-
- // Return the instance
- return $wrapperInstance;
- }
-}
-
-// [EOF]
-?>
--- /dev/null
+<?php
+/**
+ * A wrapper for database access to goverment->user data
+ *
+ * @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 UserGovermentDatabaseWrapper extends BaseDatabaseWrapper {
+ // Constants for database tables
+ const DB_TABLE_USER_GOVERMENT = "gov_user";
+
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this wrapper class
+ *
+ * @return $wrapperInstance An instance of this wrapper class
+ */
+ public final static function createUserGovermentDatabaseWrapper () {
+ // Create a new instance
+ $wrapperInstance = new UserGovermentDatabaseWrapper();
+
+ // Set (primary!) table name
+ $wrapperInstance->setTableName(self::DB_TABLE_USER_GOVERMENT);
+
+ // Return the instance
+ return $wrapperInstance;
+ }
+}
+
+// [EOF]
+?>
$linkInstance->addActionLink('company_found', "Gründe eine virtuelle Firma und mache dich (virtuell) selbstständig.");
}
-// Add link group for goverment
-$linkInstance->addLinkGroup('goverment', "Bewerbe dich bei anderen Firmen und hole dir eine Starthilfe vom virtuellen Staat ab wenn du nicht flüssig bist!");
+// Add link group for government
+$linkInstance->addLinkGroup('government', "Bewerbe dich bei anderen Firmen und hole dir eine Starthilfe vom virtuellen Staat ab wenn du nicht flüssig bist!");
if ($linkInstance->getValueInstance()->ifUserHasRequiredPoints('write_applications')) {
// Enough money to write applications to other companies
$linkInstance->addActionLink('company_list', "Alle Firmen auflisten zum Bewerben.");
-} elseif ($linkInstance->getValueInstance()->ifGovermentPaysTraining()) {
- // Goverment is able to pay a training in general
- $linkInstance->addActionLink('goverment_training', "Jetzt zur virtuellen Kurswelt und ein Training auswählen.");
+} elseif ($linkInstance->getValueInstance()->ifGovernmentPaysTraining()) {
+ // Government is able to pay a training in general
+ $linkInstance->addActionLink('government_training', "Jetzt zur virtuellen Kurswelt und ein Training auswählen.");
- // Can the goverment pay startup help?
- if ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) {
+ // Can the government pay startup help?
+ if ($linkInstance->getValueInstance()->ifGovernmentPaysStartupHelp()) {
// Add link note
- $linkInstance->addLinkNote('goverment_startup_help', "Virtuelle Starthilfe beantragen:");
+ $linkInstance->addLinkNote('government_startup_help', "Virtuelle Starthilfe beantragen:");
- // Display link to goverment for startup help
- $linkInstance->addActionLink('goverment_startup_help', "Direkt zum Antragsformular für deine Starthilfe.");
+ // Display link to government for startup help
+ $linkInstance->addActionLink('government_startup_help', "Direkt zum Antragsformular für deine Starthilfe.");
} // END - if
-} elseif ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) {
- // Display link to goverment for startup help
- $linkInstance->addActionLink('goverment_startup_help', "Direkt zum Antragsformular für deine Starthilfe.");
+} elseif ($linkInstance->getValueInstance()->ifGovernmentPaysStartupHelp()) {
+ // Display link to government for startup help
+ $linkInstance->addActionLink('government_startup_help', "Direkt zum Antragsformular für deine Starthilfe.");
} else {
- // Even goverment cannot help the gamer here
- $linkInstance->addLinkNote('goverment_depleted', "Leider kann dir der Staat nicht mehr weiterhelfen, dich zu bewerben, da du zu oft Starthilfen erhalten hast oder ein Training absolviert hast. Hier muss aber noch weiter am Spiel gearbeitet werden. :-)");
+ // Even government cannot help the gamer here
+ $linkInstance->addLinkNote('government_depleted', "Leider kann dir der Staat nicht mehr weiterhelfen, dich zu bewerben, da du zu oft Starthilfen erhalten hast oder ein Training absolviert hast. Hier muss aber noch weiter am Spiel gearbeitet werden. :-)");
}
// Add link group for money bank
+++ /dev/null
-<?php
-// Get form helper instance
-$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_goverment_startup'));
-
-// Prefetch user instance
-$helperInstance->prefetchValueInstance('user');
-
-// Add main form group
-$helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausfüllen! (Die Profildaten sollte jedoch echt sein.)");
-
-// Add group for personal data
-$helperInstance->addFormGroup('persona_data', "Deine persönliche Daten, die für die Beantragung nötig sind:");
-
-// Display email, surname and family name
-$helperInstance->addFormNote('surname', "Vorname: <span class=\"persona_data\">".$helperInstance->getValueField('surname')."</span>");
-$helperInstance->addFormNote('family', "Nachname: <span class=\"persona_data\">".$helperInstance->getValueField('family')."</span>");
-$helperInstance->addFormNote('email', "Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
-$helperInstance->addFormNote('birthday', "Geburtstag: <span class=\"persona_data\">".(int)$helperInstance->getValueField('birth_day').".".(int)$helperInstance->getValueField('birth_month').".".(int)$helperInstance->getValueField('birth_year')."</span>");
-
-// Add link placeholder for profile page
-$helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?shipsimu_profile_link?}");
-
-// Ask again for current account password
-$helperInstance->addFormGroup('password', "Bitte gebe zur Bestätigung dein derzeitiges Passwort ein.");
-$helperInstance->addFieldText('password', "Derzeitiges Passwort:");
-$helperInstance->addInputPasswordField('password');
-
-// CAPTCHA enabled?
-if ($helperInstance->ifFormSecuredWithCaptcha()) {
- $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung von Starthilfe ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du die Starthilfe beantragen kannst.");
- $helperInstance->addCaptcha();
-} // END - if
-
-// Final notices
-$helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
-$helperInstance->addInputResetButton("Alles nochmal eingeben");
-$helperInstance->addInputSubmitButton("Starthilfe beantragen");
-$helperInstance->addFormNote('data_protection', "Deine Daten werden nach den gültigen Datenschutzgesetzten gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz".");
-
-// Flush the finished form
-$helperInstance->flushContent();
-
-// Get link helper for profile link
-$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'shipsimu_profile_link', 'index.php?app={?app_short_name?}&page=login_area'));
-
-// Add action
-$linkInstance->addActionLinkById('profile', 'goto_profile_link');
-
-// Flush the finished form
-$linkInstance->flushContent();
-
-// [EOC]
-?>
-<div id="goverment_frame">
- <div id="goverment_header">
- Virtuelle Beantragung von Starthilfe
- </div>
-
- <div id="goverment_form">
- {?shipsimu_goverment_startup?}
- </div>
-</div>
+++ /dev/null
-<?php
-// Get form helper instance
-$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_goverment_training'));
-
-// Prefetch user instance
-$helperInstance->prefetchValueInstance('user');
-
-// Add main form group
-$helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausfüllen!");
-
-// Add group for personal data
-$helperInstance->addFormGroup('persona_data', "Deine persönliche Daten, die für die Kursusteilnahme nötig sind:");
-
-// Ask again for current account password
-$helperInstance->addFormGroup('password', "Bitte gebe zur Bestätigung dein derzeitiges Passwort ein.");
-$helperInstance->addFieldText('password', "Derzeitiges Passwort:");
-$helperInstance->addInputPasswordField('password');
-
-// CAPTCHA enabled?
-if ($helperInstance->ifFormSecuredWithCaptcha()) {
- $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung eines Trainingkursus ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, um den Trainingskursus zu beantragen.");
- $helperInstance->addCaptcha();
-} // END - if
-
-// Display email, surname and family name
-$helperInstance->addFormNote('surname', "Vorname: <span class=\"persona_data\">".$helperInstance->getValueField('surname')."</span>");
-$helperInstance->addFormNote('family', "Nachname: <span class=\"persona_data\">".$helperInstance->getValueField('family')."</span>");
-$helperInstance->addFormNote('email', "Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
-
-// Add link placeholder for profile page
-$helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?shipsimu_profile_link?}");
-
-// Flush the finished form
-$helperInstance->flushContent();
-
-// Get link helper for profile link
-$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'shipsimu_profile_link', 'index.php?app={?app_short_name?}&page=login_area'));
-
-// Add action
-$linkInstance->addActionLinkById('profile', 'goto_profile_link');
-
-// Flush the finished form
-$linkInstance->flushContent();
-
-// [EOC]
-?>
-<div id="goverment_frame">
- <div id="goverment_header">
- Virtuelle Beantragung eines Training-Kursus
- </div>
-
- <div id="goverment_form">
- {?shipsimu_goverment_training?}
- </div>
-</div>
--- /dev/null
+<?php
+// Get form helper instance
+$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_government_startup'));
+
+// Prefetch user instance
+$helperInstance->prefetchValueInstance('user');
+
+// Add main form group
+$helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausfüllen! (Die Profildaten sollte jedoch echt sein.)");
+
+// Add group for personal data
+$helperInstance->addFormGroup('persona_data', "Deine persönliche Daten, die für die Beantragung nötig sind:");
+
+// Display email, surname and family name
+$helperInstance->addFormNote('surname', "Vorname: <span class=\"persona_data\">".$helperInstance->getValueField('surname')."</span>");
+$helperInstance->addFormNote('family', "Nachname: <span class=\"persona_data\">".$helperInstance->getValueField('family')."</span>");
+$helperInstance->addFormNote('email', "Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
+$helperInstance->addFormNote('birthday', "Geburtstag: <span class=\"persona_data\">".(int)$helperInstance->getValueField('birth_day').".".(int)$helperInstance->getValueField('birth_month').".".(int)$helperInstance->getValueField('birth_year')."</span>");
+
+// Add link placeholder for profile page
+$helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?shipsimu_profile_link?}");
+
+// Ask again for current account password
+$helperInstance->addFormGroup('password', "Bitte gebe zur Bestätigung dein derzeitiges Passwort ein.");
+$helperInstance->addFieldText('password', "Derzeitiges Passwort:");
+$helperInstance->addInputPasswordField('password');
+
+// CAPTCHA enabled?
+if ($helperInstance->ifFormSecuredWithCaptcha()) {
+ $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung von Starthilfe ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du die Starthilfe beantragen kannst.");
+ $helperInstance->addCaptcha();
+} // END - if
+
+// Final notices
+$helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
+$helperInstance->addInputResetButton("Alles nochmal eingeben");
+$helperInstance->addInputSubmitButton("Starthilfe beantragen");
+$helperInstance->addFormNote('data_protection', "Deine Daten werden nach den gültigen Datenschutzgesetzten gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz".");
+
+// Flush the finished form
+$helperInstance->flushContent();
+
+// Get link helper for profile link
+$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'shipsimu_profile_link', 'index.php?app={?app_short_name?}&page=login_area'));
+
+// Add action
+$linkInstance->addActionLinkById('profile', 'goto_profile_link');
+
+// Flush the finished form
+$linkInstance->flushContent();
+
+// [EOC]
+?>
+<div id="government_frame">
+ <div id="government_header">
+ Virtuelle Beantragung von Starthilfe
+ </div>
+
+ <div id="government_form">
+ {?shipsimu_government_startup?}
+ </div>
+</div>
--- /dev/null
+<?php
+// Get form helper instance
+$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_government_training'));
+
+// Prefetch user instance
+$helperInstance->prefetchValueInstance('user');
+
+// Add main form group
+$helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausfüllen!");
+
+// Add group for personal data
+$helperInstance->addFormGroup('persona_data', "Deine persönliche Daten, die für die Kursusteilnahme nötig sind:");
+
+// Ask again for current account password
+$helperInstance->addFormGroup('password', "Bitte gebe zur Bestätigung dein derzeitiges Passwort ein.");
+$helperInstance->addFieldText('password', "Derzeitiges Passwort:");
+$helperInstance->addInputPasswordField('password');
+
+// CAPTCHA enabled?
+if ($helperInstance->ifFormSecuredWithCaptcha()) {
+ $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung eines Trainingkursus ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, um den Trainingskursus zu beantragen.");
+ $helperInstance->addCaptcha();
+} // END - if
+
+// Display email, surname and family name
+$helperInstance->addFormNote('surname', "Vorname: <span class=\"persona_data\">".$helperInstance->getValueField('surname')."</span>");
+$helperInstance->addFormNote('family', "Nachname: <span class=\"persona_data\">".$helperInstance->getValueField('family')."</span>");
+$helperInstance->addFormNote('email', "Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
+
+// Add link placeholder for profile page
+$helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?shipsimu_profile_link?}");
+
+// Flush the finished form
+$helperInstance->flushContent();
+
+// Get link helper for profile link
+$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'shipsimu_profile_link', 'index.php?app={?app_short_name?}&page=login_area'));
+
+// Add action
+$linkInstance->addActionLinkById('profile', 'goto_profile_link');
+
+// Flush the finished form
+$linkInstance->flushContent();
+
+// [EOC]
+?>
+<div id="government_frame">
+ <div id="government_header">
+ Virtuelle Beantragung eines Training-Kursus
+ </div>
+
+ <div id="government_form">
+ {?shipsimu_government_training?}
+ </div>
+</div>