inc/classes/main/factories/web/.htaccess -text
inc/classes/main/factories/web/class_WebNewsFactory.php -text
inc/classes/main/filter/.htaccess -text
+inc/classes/main/filter/checkboxes/.htaccess -text
+inc/classes/main/filter/checkboxes/class_RulesAcceptedFilter.php -text
inc/classes/main/filter/class_ -text
inc/classes/main/filter/class_AbstractFilterDecorator.php -text
inc/classes/main/filter/class_FilterChain.php -text
+inc/classes/main/filter/null/.htaccess -text
+inc/classes/main/filter/null/class_NullFilter.php -text
inc/classes/main/filter/validator/.htaccess -text
inc/classes/main/filter/validator/class_EmailValidatorFilter.php -text
inc/classes/main/filter/validator/class_PasswordValidatorFilter.php -text
{?navigation?}
<div id="main_header">
-[HEADER_APPLICATION_SELECTOR]
+{app_selector_header}
</div>
<div id="main_content">
</div>
<div id="main_footer">
-[FOOTER_APPLICATION_SELECTOR]
+{app_selector_footer}
</div>
{?footer?}
// @TODO Add some more pre/post filters to the controller
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_validator'));
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_validator'));
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_validator'));
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('rules_accepted_filter'));
// Return the prepared instance
return $commandInstance;
{?header?}
<div id="main_header">
-[HEADER_SHIP_SIMU]
+{ship_simu_header]
</div>
<div id="navigation">
</div>
<div id="main_footer">
-[FOOTER_SHIP_SIMU]
+{ship_simu_footer}
</div>
{?footer?}
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A filter for checking if the user has accepted the rules. This is mainly
+ * used and done in registration process and should not be removed from your
+ * application.
+ *
+ * @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 RulesAcceptedFilter extends BaseFrameworkSystem implements Filterable {
+ /**
+ * Private constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set part description
+ $this->setObjectDescription("A filter for checking if rules where accepted");
+
+ // Create unique ID number
+ $this->createUniqueID();
+
+ // Clean up a little
+ $this->removeNumberFormaters();
+ $this->removeSystemArray();
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createRulesAcceptedFilter () {
+ // Get a new instance
+ $filterInstance = new RulesAcceptedFilter();
+
+ // 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
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Implement this!
+ $this->partialStub("Please implement this method.");
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * As the name said: A null filter does just pass through the data. This is
+ * useful to make other filters switch on/off-able.
+ *
+ * @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 NullFilter extends BaseFrameworkSystem implements Filterable {
+ /**
+ * Private constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set part description
+ $this->setObjectDescription("A null filter");
+
+ // Create unique ID number
+ $this->createUniqueID();
+
+ // Clean up a little
+ $this->removeNumberFormaters();
+ $this->removeSystemArray();
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createNullFilter () {
+ // Get a new instance
+ $filterInstance = new NullFilter();
+
+ // 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
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Not implemented, just passing through
+ }
+}
+
+// [EOF]
+?>
// CFG: PASSWORD-VALIDATOR
$cfg->setConfigEntry('password_validator', "PasswordValidatorFilter");
+// CFG: RULES-ACCEPTED-FILTER
+$cfg->setConfigEntry('rules_accepted_filter', "RulesAcceptedFilter");
+
// [EOF]
?>