]> git.mxchange.org Git - shipsimu.git/commitdiff
createUniqueID -> generateUniqueId renamed, dataset criteria added, registration...
authorRoland Häder <roland@mxchange.org>
Mon, 9 Jun 2008 14:09:31 +0000 (14:09 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 9 Jun 2008 14:09:31 +0000 (14:09 +0000)
89 files changed:
.gitattributes
application/selector/class_ApplicationHelper.php
application/selector/class_ApplicationSelector.php
application/ship-simu/class_ApplicationHelper.php
application/ship-simu/config.php
application/ship-simu/main/class_Merchant.php
application/ship-simu/main/class_WorksContract.php
application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php
application/ship-simu/main/companies/class_ShippingCompany.php
application/ship-simu/main/constructions/berths/class_Berth.php
application/ship-simu/main/constructions/docks/class_DryDock.php
application/ship-simu/main/constructions/harbors/class_Harbor.php
application/ship-simu/main/constructions/terminals/class_Terminal.php
application/ship-simu/main/constructions/yards/class_Shipyard.php
application/ship-simu/main/drives/motor/class_Motor.php
application/ship-simu/main/factories/class_ShipSimuWebNewsFactory.php
application/ship-simu/main/parts/maschineroom/class_MaschineRoom.php
application/ship-simu/main/personell/class_SimulatorPersonell.php
application/ship-simu/main/personell/company/class_CompanyEmployee.php
application/ship-simu/main/registration/class_ShipSimuRegistration.php
application/ship-simu/main/ships/passenger/class_PassengerShip.php
application/ship-simu/main/structures/extended/cabines/ship/class_EconomyCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_LowCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_LuxuryCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_PremierCabin.php
application/ship-simu/main/structures/extended/decks/cargo/class_CarDeck.php
application/ship-simu/main/structures/extended/decks/cargo/class_TrainDeck.php
application/ship-simu/main/structures/extended/decks/cargo/class_TruckDeck.php
application/ship-simu/main/structures/extended/upper/class_Bridge.php
db/user/.htaccess [new file with mode: 0644]
inc/classes/interfaces/criteria/class_Criteria.php
inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php
inc/classes/interfaces/registration/class_UserRegister.php
inc/classes/main/actions/.htaccess [new file with mode: 0644]
inc/classes/main/actions/class_ [new file with mode: 0644]
inc/classes/main/actions/class_BaseAction.php [new file with mode: 0644]
inc/classes/main/actions/post_registration/.htaccess [new file with mode: 0644]
inc/classes/main/cache/class_MemoryCache.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/commands/web/class_WebDoFormCommand.php
inc/classes/main/commands/web/class_WebHomeCommand.php
inc/classes/main/commands/web/class_WebRegisterCommand.php
inc/classes/main/compressor/class_Bzip2Compressor.php
inc/classes/main/compressor/class_GzipCompressor.php
inc/classes/main/compressor/class_NullCompressor.php
inc/classes/main/console/class_ConsoleTools.php
inc/classes/main/controller/default/class_WebDefaultController.php
inc/classes/main/controller/default/class_WebDefaultNewsController.php
inc/classes/main/controller/form/class_WebDoFormController.php
inc/classes/main/criteria/class_DataSetCriteria.php
inc/classes/main/criteria/class_SearchCriteria.php
inc/classes/main/crypto/class_CryptoHelper.php
inc/classes/main/database/databases/class_LocalFileDatabase.php
inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php
inc/classes/main/debug/class_DebugConsoleOutput.php
inc/classes/main/debug/class_DebugErrorLogOutput.php
inc/classes/main/debug/class_DebugWebOutput.php
inc/classes/main/extended/class_ObjectLimits.php
inc/classes/main/factories/cache/class_CacheFactory.php
inc/classes/main/factories/objects/class_ObjectFactory.php
inc/classes/main/factories/web/class_WebNewsFactory.php
inc/classes/main/filter/checkboxes/class_RulesAcceptedFilter.php
inc/classes/main/filter/class_FilterChain.php
inc/classes/main/filter/null/class_NullFilter.php
inc/classes/main/filter/validator/class_EmailValidatorFilter.php
inc/classes/main/filter/validator/class_PasswordValidatorFilter.php
inc/classes/main/filter/validator/class_UserNameValidatorFilter.php
inc/classes/main/helper/web/class_WebFormHelper.php
inc/classes/main/io/class_FileIoStream.php
inc/classes/main/io/class_FrameworkDirectoryPointer.php
inc/classes/main/io/class_FrameworkFileInputPointer.php
inc/classes/main/io/class_FrameworkFileOutputPointer.php
inc/classes/main/language/class_LanguageSystem.php
inc/classes/main/output/class_ConsoleOutput.php
inc/classes/main/output/class_WebOutput.php
inc/classes/main/registry/class_Registry.php
inc/classes/main/request/class_HttpRequest.php
inc/classes/main/resolver/web/class_WebCommandResolver.php
inc/classes/main/resolver/web/class_WebControllerResolver.php
inc/classes/main/response/class_HttpResponse.php
inc/classes/main/result/class_DatabaseResult.php
inc/classes/main/rng/class_RandomNumberGenerator.php
inc/classes/main/template/class_TemplateEngine.php
inc/classes/main/user/class_User.php
inc/classes/middleware/compressor/class_CompressorChannel.php
inc/classes/middleware/database/class_DatabaseConnection.php
inc/classes/middleware/debug/class_DebugMiddleware.php
inc/classes/middleware/io/class_FileIoHandler.php
inc/config.php

index f4d95f2842f72d493671077d77a552e2b586c9d0..64cbe6fae15fda70da1a42d9d850070a7c3fbe59 100644 (file)
@@ -131,6 +131,7 @@ application/ship-simu/templates/de/html/.htaccess -text
 application/ship-simu/templates/de/html/nav_advert.tpl -text
 application/ship-simu/templates/de/html/selector_ship-simu.tpl -text
 db/.htaccess -text
+db/user/.htaccess -text
 devel/.htaccess -text
 devel/class_Debug.php -text
 docs/COPYING -text
@@ -277,6 +278,10 @@ inc/classes/interfaces/template/view/class_ViewHelper.php -text
 inc/classes/interfaces/user/.htaccess -text
 inc/classes/interfaces/user/class_ManageableUser.php -text
 inc/classes/main/.htaccess -text
+inc/classes/main/actions/.htaccess -text
+inc/classes/main/actions/class_ -text
+inc/classes/main/actions/class_BaseAction.php -text
+inc/classes/main/actions/post_registration/.htaccess -text
 inc/classes/main/cache/.htaccess -text
 inc/classes/main/cache/class_MemoryCache.php -text
 inc/classes/main/class_ -text
index 3452f96d2c764aaad8a1a27b2a61917b267724ce..d2e4c9153e66669f6624e0efec6d5a5e89b411c1 100644 (file)
@@ -78,7 +78,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $this->setObjectDescription("Application-Helper");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Tidy up a little
                $this->removeSystemArray();
index ac5f1adbb98a6a1c69a964e2a8e421cd2d2854fd..fffdd3d20fb4f3707e5cd3d746ab55c2c04cf0f2 100644 (file)
@@ -63,7 +63,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
                $this->setObjectDescription("Applikationswechsler");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Remove system array and thousand seperator
                $this->removeSystemArray();
index abe7536647c7cfdd4949261f724c2e09b51bf6de..87a4e309fdbce3cc20ff6dd55d45818c01ba9cc2 100644 (file)
@@ -82,7 +82,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $this->setObjectDescription("Application-Helper");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Tidy up a little
                $this->removeSystemArray();
index c1d4890f5481f3a61e4d20fa07c49a0837810928..1b3b1a2254565527c494ee8abd2a6f5f2a815424 100644 (file)
@@ -73,5 +73,8 @@ $cfg->setConfigEntry('command_parameter', "page");
 // CFG: USER-REGISTRATION
 $cfg->setConfigEntry('user_registration', "ShipSimuRegistration");
 
+// CFG: USER-STATUS-REGISTER
+$cfg->setConfigEntry('user_status_register', "UNCONFIRMED");
+
 // [EOF]
 ?>
index b483968a975f36d8d14ab13ddabfc3f8312c68a8..1f0b3c1ed8847ac0c78da9623c23d629961f6238 100644 (file)
@@ -40,7 +40,7 @@ class Merchant extends BaseFrameworkSystem {
                $this->setObjectDescription("H&auml;ndler");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 96ce70dfbb59d56b5d4ff25d851f1c206cc7e0e8..d1cf574b85bc5af4df68b03623365c3da0d89a89 100644 (file)
@@ -49,7 +49,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                $this->setObjectDescription("Bauvertrag");
 
                // Unique-ID generieren
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 4fbfdcc5bd8b8100f1c418952168dc4e2dcf5038..0940b79630a8c71dc65494c68983f9b873ef75b6 100644 (file)
@@ -35,7 +35,7 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable {
                $this->setObjectDescription("Registration handling command for Ship-Simu");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index f7616b32a8545dcce9eaa53896ab2fa34b6e68a7..4b73bcc0903f8b396726c703f31a1924e307b937 100644 (file)
@@ -75,7 +75,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                $this->setObjectDescription("Reederei");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 7d46833046172ba59a488e657e340ca34c6ddf52..512cf74e949c4cbec9ea579ec0914e3bb71bf0f4 100644 (file)
@@ -37,7 +37,7 @@ class Berth extends BaseConstruction {
                $this->setObjectDescription("Liegeplatz");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 }
 
index b69692a8dd57bdcd0877cbf3ac44081f8d4d155c..44efd03224128c979ee5d957b74c50fb96c24108 100644 (file)
@@ -34,7 +34,7 @@ class DryDock extends BaseConstruction {
                $this->setObjectDescription("Trockendock");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 }
 
index eb2f6f37c555528b7bc39099291a42c73ecaf1da..6509f45d274b484b0423ce68164413a14def5bc4 100644 (file)
@@ -43,7 +43,7 @@ class Harbor extends BaseConstruction {
                $this->setObjectDescription("Hafen");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index d8fa8a059a068f412b0ae6080636e016a3c245e0..3d922fb451f572d93fa0c4356b71af2d6ba1b864 100644 (file)
@@ -34,7 +34,7 @@ class Terminal extends BaseConstruction {
                $this->setObjectDescription("Anlegebr&uuml;cke");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 }
 
index 3fdb10a4e93436c238889900a587057149640ec3..9b9540b5005fe79a899b2870eca0e13f6f81ea05 100644 (file)
@@ -57,7 +57,7 @@ class Shipyard extends BaseConstruction {
                $this->createShipTypeList();
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        // Create a shipyard and notify it about it's owner
index b8f537701a39211ca80306c47d03d82d4583e07f..4287d023f9801671f28d48085f07b1a3beb309af 100644 (file)
@@ -31,7 +31,7 @@ class Motor extends BaseDrive implements TradeableItem, ConstructableShipPart {
                $this->setObjectDescription("Namenloser Motor");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 760cbaa6becf73c8eb631113d1996b8f8347363e..1a59cc5e7df58872cb90f662f5601e587035e31b 100644 (file)
@@ -35,7 +35,7 @@ class ShipSimuWebNewsFactory extends BaseFrameworkSystem {
                $this->setObjectDescription("News-Objektefabrik f&uuml;r Ship-Simu");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 78ae99815fd4cfaa515c3d9cf3d60b2187205989..4a45e33402c5405d125a190fa232df7893d6b30d 100644 (file)
@@ -31,7 +31,7 @@ class MaschineRoom extends BaseShipPart {
                $this->setObjectDescription("Maschinenraum");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index a089ae695916177dbe2a9931844f7f4932ec6453..735f65d111bf70a47a5fcc41e4b0eafb9fe7bef8 100644 (file)
@@ -44,7 +44,7 @@ class SimulatorPersonell extends BasePersonell {
                $this->setObjectDescription("Simulationspersonal");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean-up a little
                $this->removeSystemArray();
index 36b97c4da1e0c1e284de68e507afe0f6b1efdeee..53c1ab4522bd14d4bd80718b3c981116106c48b0 100644 (file)
@@ -34,7 +34,7 @@ class CompanyEmployee extends SimulatorPersonell {
                $this->setObjectDescription("Firmenangestellte(r)");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 9909c3d6d128af731c9771b8940013cdd2b1017e..01235f7e60558402c0fc87fdcdabb3d5f96730b8 100644 (file)
@@ -27,6 +27,25 @@ class ShipSimuRegistration extends BaseRegistration {
         */
        private $hashedPassword = "";
 
+       /**
+        * Elements for criteria
+        */
+       private $criteriaElements = array(
+               'username',
+               'pass_hash',
+               'email' => 'email1',
+               'surname',
+               'family',
+               'street',
+               'zip',
+               'city',
+               'icq',
+               'jabber',
+               'yahoo',
+               'aol',
+               'msn'
+       );
+
        /**
         * Protected constructor
         *
@@ -40,7 +59,7 @@ class ShipSimuRegistration extends BaseRegistration {
                $this->setObjectDescription("Ship-Simu registration class");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
@@ -125,6 +144,32 @@ class ShipSimuRegistration extends BaseRegistration {
        public function doPostAction () {
                $this->partialStub();
        }
+
+       /**
+        * Adds registration elements to a given dataset instance
+        *
+        * @param       $criteriaInstance       An instance of a storeable criteria
+        * @return      void
+        */
+       public function addElementsToDataSet (StoreableCriteria $criteriaInstance) {
+               // Add a lot elements to the dataset criteria
+               foreach ($this->criteriaElements as $alias=>$element) {
+                       // Do we have an alias?
+                       if (is_string($alias)) {
+                               // Yes, so use it
+                               $criteriaInstance->addCriteria($alias, $this->getRequestInstance()->getRequestElement($element));
+                       } else {
+                               // No, default entry
+                               $criteriaInstance->addCriteria($element, $this->getRequestInstance()->getRequestElement($element));
+                       }
+               } // END - foreach
+
+               // Mark the username as unique key
+               $criteriaInstance->setUniqueKey('username');
+
+               // Add account status as configured
+               $criteriaInstance->addConfiguredCriteria('user_status', 'user_status_register');
+       }
 }
 
 //
index 4e0dd198cc1b1207d54e44a0445a12fdcb532163..52a227a12d2842ad9b9f4c7a25b98625fa9210bb 100644 (file)
@@ -32,7 +32,7 @@ class PassengerShip extends BaseShip implements ConstructableShip, LimitableObje
                $this->setObjectDescription("Passagier-Schiff");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 66927fb910fbc1d8523df692f9710a663f74d5ea..ffd77b6e9b0024189fb639dc86716904ea15c479 100644 (file)
@@ -31,7 +31,7 @@ class EconomyCabin extends BaseCabin implements TradeableItem, ConstructableShip
                $this->setObjectDescription("Economy-Class-Kabine");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 4875e4f2405657ca707d68e775b1368c13b10014..25a7b4a9f144b43deb89796ce0d3fb8b988487e5 100644 (file)
@@ -31,7 +31,7 @@ class LowCabin extends BaseCabin implements TradeableItem, ConstructableShipPart
                $this->setObjectDescription("2Star-Class-Kabine");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 19f8495d98f38336f06aff3bb761cacf074855e0..1711563e76f337cfbe98fb1339b7f474e6d0f86e 100644 (file)
@@ -31,7 +31,7 @@ class LuxuryCabin extends BaseCabin implements TradeableItem, ConstructableShipP
                $this->setObjectDescription("Luxuskabine");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index ea9e14a38f05667c347392636e0c147a8b1f9398..df76e31f9f2ce22c1a1581604bcc818529dd0348 100644 (file)
@@ -31,7 +31,7 @@ class PremierCabin extends BaseCabin implements TradeableItem, ConstructableShip
                $this->setObjectDescription("Premier-Class-Kabine");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 89bdc2714ed0ff792a7877008413c4c6eeb57620..33faadccc14ac79e36f2065c7e31dc867034cc0d 100644 (file)
@@ -31,7 +31,7 @@ class CarDeck extends BaseDeck implements TradeableItem, ConstructableShipPart {
                $this->setObjectDescription("Autodeck");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 209b0728855e19a7f42e9cf37a65b405aa1e8cc2..acd59468c4f39928319ff1e24336b4f66dc2bcf5 100644 (file)
@@ -31,7 +31,7 @@ class TrainDeck extends BaseDeck implements TradeableItem, ConstructableShipPart
                $this->setObjectDescription("Zug-Deck");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 64c4b57de0770e79a96662a881e9d336696a36b3..bc710ef0c251667f480c3ea1e091a481710655c3 100644 (file)
@@ -32,7 +32,7 @@ class TruckDeck extends BaseDeck implements TradeableItem, ConstructableShipPart
                $this->setObjectDescription("LKW-Deck");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index b0841d25f76857ca5f9bb3002168f54e0727b53b..203bb03cfb1aac57b2ed7ad6108234b492e04f8b 100644 (file)
@@ -31,7 +31,7 @@ class Bridge extends BaseUpperStructure implements TradeableItem, ConstructableS
                $this->setObjectDescription("Br&uuml;cke");
 
                // Generate unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
diff --git a/db/user/.htaccess b/db/user/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
index d69efaddcb7de2186643aabf1a9fcf4d9c025164..35b51f35b5a74c775607be64e2c6066073ea69e5 100644 (file)
  */
 interface Criteria extends FrameworkInterface {
        /**
-        * Add extra criteria
+        * Add criteria
         *
         * @param       $criteriaKey    Criteria key
         * @param       $criteriaValue  Criteria value
         * @return      void
         */
        function addCriteria ($criteriaKey, $criteriaValue);
+
+       /**
+        * Add configured criteria
+        *
+        * @param       $criteriaKey    Criteria key
+        * @param       $configEntry    Configuration entry
+        * @return      void
+        */
+       function addConfiguredCriteria ($criteriaKey, $configEntry);
 }
 
 //
index 6c2b998ec46aaceb5ac765d6ab73a295991be2eb..f61df0713e040f6e7026a6b2dd62cefc08d40181 100644 (file)
@@ -63,6 +63,7 @@ interface DatabaseFrontendInterface extends FrameworkDatabaseInterface {
         *
         * @param       $dataSetInstance        A storeable data set
         * @return      void
+        * @throws      SqlException    If an SQL error occurs
         */
        function insertDataSet (StoreableCriteria $dataSetInstance);
 }
index cb83c187004ca249a7dae4e0adc7f875904752bc..9fbf2ff4f152857e2781680cd2f5bcbe188e4e2b 100644 (file)
@@ -62,6 +62,14 @@ interface UserRegister extends FrameworkInterface {
         * @return      void
         */
        function doPostAction ();
+
+       /**
+        * Adds registration elements to a given dataset instance
+        *
+        * @param       $criteriaInstance       An instance of a storeable criteria
+        * @return      void
+        */
+       function addElementsToDataSet (StoreableCriteria $criteriaInstance);
 }
 
 //
diff --git a/inc/classes/main/actions/.htaccess b/inc/classes/main/actions/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/actions/class_ b/inc/classes/main/actions/class_
new file mode 100644 (file)
index 0000000..797b770
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+/**
+ * 
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.3.0
+ * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * 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 ???Action extends BaseAction implements Commandable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set description
+               $this->setObjectDescription("");
+
+               // Generate unique key
+               $this->createUniqueID();
+       }
+
+       /**
+        * Creates an instance of this action
+        *
+        * @return      $actionInstance         An instance of this action class
+        */
+       public final static function create???Action () {
+               // Get a new instance
+               $actionInstance = new ???Action();
+
+               // 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
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->partialStub("You have to implement me.");
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/actions/class_BaseAction.php b/inc/classes/main/actions/class_BaseAction.php
new file mode 100644 (file)
index 0000000..9b2df36
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/**
+ * A general action class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.3.0
+ * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * 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 BaseAction extends BaseFrameworkSystem {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/actions/post_registration/.htaccess b/inc/classes/main/actions/post_registration/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
index e708b2c0200018b75982940edff210321e2b44dc..01d2a367819df645c6f0251e726154a6537546b4 100644 (file)
@@ -40,7 +40,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable {
                $this->setObjectDescription("Memory cache");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 0d8213210adf2000e0592850a8902b8258cf1755..f61deb85c47df5f02c5e04f8bc78c8f8004994bc 100644 (file)
@@ -432,7 +432,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         *
         * @return      void
         */
-       public final function createUniqueID () {
+       public final function generateUniqueId () {
                // Existiert noch keine?
                if (empty($this->uniqueID)) {
 
index bfdf8feca039f0ab64dde1af35c6fb87767253ea..e7f59adeee5049e89b676ce4ad40c69226210f43 100644 (file)
@@ -35,7 +35,7 @@ class WebDoFormCommand extends BaseCommand implements Commandable {
                $this->setObjectDescription("Command for handling forms on a centralized place");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 7fe95f25ec2e7b9cd62b1d0d063f076bb089240a..8dcf3b1c451cc1a05fcfa0d8ca5644ad5be3f856 100644 (file)
@@ -35,7 +35,7 @@ class WebHomeCommand extends BaseCommand implements Commandable {
                $this->setObjectDescription("Command for the &quot;home&quot; page");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index abdc9ecc153adc14eff28a1db66d12419f54732b..1f85254b819bc94d93f94a76c2b7402fba5bec83 100644 (file)
@@ -35,7 +35,7 @@ class WebRegisterCommand extends BaseCommand implements Commandable {
                $this->setObjectDescription("Command for the registration form");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
index 24566b91d880cab3fcc3348ece9c26f5bff53c61..a810a79c4c79689ec0b1fab75087a7bbb0043eb9 100644 (file)
@@ -35,7 +35,7 @@ class Bzip2Compressor extends BaseFrameworkSystem implements Compressor {
                $this->setObjectDescription("BZIP2 compressor");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 08b1a6ded09325ec2350f8b2056fbb7b61ebc611..9a4489b19276b8aaae665092b1a3958b7ab005a5 100644 (file)
@@ -35,7 +35,7 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor {
                $this->setObjectDescription("GZIP compressor");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 157dc1a9ea41d0c270adcae6552bed674ca35a2e..38999e189b1d10181077c0fe93a58c82c271e607 100644 (file)
@@ -35,7 +35,7 @@ class NullCompressor extends BaseFrameworkSystem implements Compressor {
                $this->setObjectDescription("Null compressor");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index c1da6997481af3826120fc53173ea4abe815c2a2..ffdc18214ca599b3d3e97a2d7c5e68379e1a7947 100644 (file)
@@ -35,7 +35,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                $this->setObjectDescription("General console tools");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 9d60e6178668eea76ec086bc6b3fe76fca8d5188..ec56fdd9fb64461c8130014af9ecf7a36a9d5d5b 100644 (file)
@@ -35,7 +35,7 @@ class WebWebDefaultController extends BaseController implements Controller {
                $this->setObjectDescription("Default controller for all other requests");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index b8bbc05544c0ea0d7482b47de98ed63e1f52d9e8..326c0b00bce91ea26f80cb8574aa987aa3190cb5 100644 (file)
@@ -35,7 +35,7 @@ class WebDefaultNewsController extends BaseController implements Controller {
                $this->setObjectDescription("Default controller with news");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 8d46880e674f76986b6ffb1674d1983d557f5019..db7cfb432522612d4b131ccc85646ff698f4d35a 100644 (file)
@@ -35,7 +35,7 @@ class WebDoFormController extends BaseController implements Controller {
                $this->setObjectDescription("Controller for handling forms");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index d16f0395c5caeb4a9631003dd06667c3e64d0ff3..feb6366fac03eb5fc0effabdec8b3d831d39621c 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class DataSetCriteria extends BaseFrameworkSystem implements StoreableCriteria {
+       /**
+        * Table name
+        */
+       private $tableName = "";
+
+       /**
+        * Table columns (criteria) to store
+        */
+       private $tableColumns = array();
+
+       /**
+        * Unique key
+        */
+       private $uniqueKey = "";
+
        /**
         * Protected constructor
         *
@@ -36,7 +51,7 @@ class DataSetCriteria extends BaseFrameworkSystem implements StoreableCriteria {
                $this->setObjectDescription("Storeable data set for databases");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
@@ -57,14 +72,83 @@ class DataSetCriteria extends BaseFrameworkSystem implements StoreableCriteria {
        }
 
        /**
-        * Add extra criteria
+        * Add criteria
         *
         * @param       $criteriaKey    Criteria key
         * @param       $criteriaValue  Criteria value
         * @return      void
         */
        public function addCriteria ($criteriaKey, $criteriaValue) {
-               die("STUB!");
+               $this->tableColumns[(string) $criteriaKey] = $criteriaValue;
+       }
+
+       /**
+        * Add configured criteria
+        *
+        * @param       $criteriaKey    Criteria key
+        * @param       $configEntry    Configuration entry
+        * @return      void
+        */
+       public function addConfiguredCriteria ($criteriaKey, $configEntry) {
+               // Add configuration entry as criteria
+               $value = $this->getConfigInstance()->readConfig($configEntry);
+               $this->addCriteria($criteriaKey, $value);
+       }
+
+       /**
+        * Setter for table name
+        *
+        * @param       $tableName      Name of the table to set
+        * @return      void
+        */
+       public final function setTableName ($tableName) {
+               $this->tableName = (string) $tableName;
+       }
+
+       /**
+        * Getter for table name
+        *
+        * @return      $tableName      Name of the table to set
+        */
+       public final function getTableName () {
+               return $this->tableName;
+       }
+
+       /**
+        * Setter for unique key
+        *
+        * @param       $uniqueKey      Column to use as unique key
+        * @return      void
+        */
+       public final function setUniqueKey ($uniqueKey) {
+               $this->uniqueKey = (string) $uniqueKey;
+       }
+
+       /**
+        * Getter for unique key
+        *
+        * @return      $uniqueKey      Column to use as unique key
+        */
+       public final function getUniqueKey () {
+               return $this->uniqueKey;
+       }
+
+       /**
+        * Getter for unique key value
+        *
+        * @return      $uniqueValue    Value of the unique key
+        */
+       public final function getUniqueValue () {
+               return $this->tableColumns[$this->getUniqueKey()];
+       }
+
+       /**
+        * Getter for criteria array
+        *
+        * @return      $tableColumns
+        */
+       public final function getCriteriaArray () {
+               return $this->tableColumns;
        }
 }
 
index a0d8003edbedf1398ccfaa534b322cc15a9d8b9e..f948909671be7412d9fa19ac8e744c3847167b3a 100644 (file)
@@ -52,7 +52,7 @@ class SearchCriteria extends BaseFrameworkSystem implements LocalSearchCriteria
                $this->setObjectDescription("Search criteria class");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
@@ -73,7 +73,7 @@ class SearchCriteria extends BaseFrameworkSystem implements LocalSearchCriteria
        }
 
        /**
-        * Add extra criteria
+        * Add criteria
         *
         * @param       $criteriaKey    Criteria key
         * @param       $criteriaValue  Criteria value
@@ -83,6 +83,19 @@ class SearchCriteria extends BaseFrameworkSystem implements LocalSearchCriteria
                $this->searchCriteria[$criteriaKey] = $criteriaValue;
        }
 
+       /**
+        * Add configured criteria
+        *
+        * @param       $criteriaKey    Criteria key
+        * @param       $configEntry    Configuration entry
+        * @return      void
+        */
+       public function addConfiguredCriteria ($criteriaKey, $configEntry) {
+               // Add the configuration entry as a criteria
+               $value = $this->getConfigInstance()->readConfig($configEntry);
+               $this->addCriteria($criteriaKey, $value);
+       }
+
        /**
         * Setter for limit
         *
@@ -93,6 +106,16 @@ class SearchCriteria extends BaseFrameworkSystem implements LocalSearchCriteria
                $this->limit = $limit;
        }
 
+       /**
+        * Getter for limit
+        *
+        * @param       
+        * @return      $limit  Search limit
+        */
+       public final function getLimit () {
+               return $this->limit;
+       }
+
        /**
         * Setter for skip
         *
@@ -103,6 +126,16 @@ class SearchCriteria extends BaseFrameworkSystem implements LocalSearchCriteria
                $this->skip = $skip;
        }
 
+       /**
+        * Getter for skip
+        *
+        * @param       
+        * @return      $skip   Search skip
+        */
+       public final function getSkip () {
+               return $this->skip;
+       }
+
        /**
         * "Getter" for a cache key
         *
@@ -130,6 +163,26 @@ class SearchCriteria extends BaseFrameworkSystem implements LocalSearchCriteria
                // Return the cache key
                return $cacheKey;
        }
+
+       /**
+        * Get criteria element or null if not found
+        *
+        * @param       $criteria       The criteria we want to have
+        * @return      $value          Wether the value of the critera or null
+        */
+       public function getCriteriaElemnent ($criteria) {
+               // Default is not found
+               $value = null;
+
+               // Is the criteria there?
+               if (isset($this->searchCriteria[$criteria])) {
+                       // Then use it
+                       $value = $this->searchCriteria[$criteria];
+               }
+
+               // Return the value
+               return $value;
+       }
 }
 
 // [EOF]
index fc0cd39b806d64da5c7ba365e14d691e060b84bd..cdde42113806c1e70aa1fbdda9f7a7c68bfbad16 100644 (file)
@@ -50,7 +50,7 @@ class CryptoHelper extends BaseFrameworkSystem {
                $this->setObjectDescription("Cryptographical helper");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index db1d87e90aa7ccac0db9deaf5a22a26bbf733f8d..c40fbf9490c0ec93118685ce2d772395898e066c 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontendInterface {
+
        // Constants for MySQL backward-compatiblity (PLEASE FIX THEM!)
-       const DB_CODE_TABLE_MISSING = 0x000;
+       const DB_CODE_TABLE_MISSING     = 0x000;
+       const DB_CODE_TABLE_UNWRITEABLE = 0x001;
 
        /**
         * Save path for "file database"
@@ -76,7 +78,7 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
                $this->setObjectDescription("Class for local file databases");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeSystemArray();
@@ -558,9 +560,54 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
                                'rows'          => array()
                        );
 
+                       // Initialize limit/skip
+                       $limitFound = 0; $skipFound = 0;
+
                        // Read the directory with some exceptions
-                       while ($dataFile = $directoryInstance->readDirectoryExcept(array(".", "..", ".htaccess", ".svn"))) {
-                               $this->partialStub(sprintf("File %s found.", $dataFile));
+                       while (($dataFile = $directoryInstance->readDirectoryExcept(array(".", "..", ".htaccess", ".svn"))) && ($limitFound < $criteriaInstance->getLimit())) {
+                               // Open this file for reading
+                               $filePointer = FrameworkFileInputPointer::createFrameworkFileInputPointer($pathName . $dataFile);
+
+                               // Get the raw data and BASE64-decode it
+                               $compressedData = base64_decode($filePointer->readLinesFromFile());
+
+                               // Close the file and throw the instance away
+                               $filePointer->closeFile();
+                               unset($filePointer);
+
+                               // Decompress it
+                               $serializedData = $this->getCompressorChannel()->getCompressor()->decompressStream($compressedData);
+
+                               // Unserialize it
+                               $dataArray = unserialize($serializedData);
+
+                               // Is this an array?
+                               if (is_array($dataArray)) {
+                                       // Search in the criteria with FMFW (First Matches, First Wins)
+                                       foreach ($dataArray as $key=>$value) {
+                                               // Get criteria element
+                                               $criteria = $criteriaInstance->getCriteriaElemnent($key);
+
+                                               // Is the criteria met?
+                                               if ((!is_null($criteria)) && ($criteria == $value))  {
+
+                                                       // Shall we skip this entry?
+                                                       if ($criteriaInstance->getSkip() > 0) {
+                                                               // We shall skip some entries
+                                                               if ($skipFound < $criteriaInstance->getSkip()) {
+                                                                       // Skip this entry
+                                                                       $skipFound++;
+                                                                       break;
+                                                               } // END - if
+                                                       } // END - if
+
+                                                       // Entry found!
+                                                       $resultData['rows'][]    = $dataArray;
+                                                       $limitFound++;
+                                                       break;
+                                               } // END - if
+                                       } // END - foreach
+                               } // END - if
                        } // END - while
 
                        // Close directory and throw the instance away
@@ -591,20 +638,36 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
         *
         * @param       $dataSetInstance        A storeable data set
         * @return      void
+        * @throws      SqlException    If an SQL error occurs
         */
        public function insertDataSet (StoreableCriteria $dataSetInstance) {
                // Create full path name
                $fqfn = sprintf("%s%s/%s.%s",
                        $this->getSavePath(),
                        $dataSetInstance->getTableName(),
-                       $dataSetInstance->getCombinedUniqueKey(),
+                       md5($dataSetInstance->getUniqueValue()),
                        $this->getFileExtension()
                );
-               die($fqfn);
+
+               // Skip here while developing
+               return true;
 
                // Try to save the request away
                try {
                        // Get a file pointer instance
+                       $filePointer = FrameworkFileOutputPointer::createFrameworkFileOutputPointer($fqfn, 'w');
+
+                       // Get the criteria array from the dataset
+                       $criteriaArray = $dataSetInstance->getCriteriaArray();
+
+                       // Serialize and compress it
+                       $compressedData = $this->getCompressorChannel()->getCompressor()->compressStream(serialize($criteriaArray));
+
+                       // Write this data BASE64 encoded to the file
+                       $filePointer->writeToFile(base64_encode($compressedData));
+
+                       // Close the file pointer
+                       $filePointer->closeFile();
 
                        // Reset last error message and exception
                        $this->resetLastError();
@@ -612,6 +675,9 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
                        // Catch all exceptions and store them in last error
                        $this->lastException = $e;
                        $this->lastError = $e->getMessage();
+
+                       // Throw an SQL exception
+                       throw new SqlException (array($this, sprintf("Cannot write data to table &#39;%s&#39;", $tableName), self::DB_CODE_TABLE_UNWRITEABLE), self::EXCEPTION_SQL_QUERY);
                }
        }
 }
index 262c950c898698bfe18d3b7becc803cff2cee27b..88bc13fbb24e1ee3b91782005888fb2431f26b4f 100644 (file)
@@ -51,7 +51,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper {
                $this->setObjectDescription("Database wrapper for user objects");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
@@ -131,15 +131,12 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper {
         * @return      void
         */
        public function insertRegistrationObject (UserRegister $registrationInstance) {
-               // Get the request instance which we use for saving
-               $requestInstance = $registrationInstance->getRequestInstance();
-
                // Generate a data set for the request
                $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria');
                $dataSetInstance->setTableName(self::DB_TABLE_USER);
 
-               // Add all needed request elements to the data set
-               //$requestInstance->debugInstance();
+               // Add registration elements to the dataset
+               $registrationInstance->addElementsToDataSet($dataSetInstance);
 
                // "Insert" this request instance completely into the database
                $this->getDatabaseInstance()->insertDataSet($dataSetInstance);
index 4d586db273786904dfbcec923bb4a06fa5433844..f7dbea7589d2dc47f7e9b81f99a32e747b4442c8 100644 (file)
@@ -35,7 +35,7 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output
                $this->setObjectDescription("Debug output for the console");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index a21189f24f981d27b1c6e224c43e0e4b38604618..af33e70080ede3d9924f959a682297f34afbe64b 100644 (file)
@@ -35,7 +35,7 @@ class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger, Outpu
                $this->setObjectDescription("Debug output to error_log()");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index c82bdd4f442ae7fe3f3046137d5cfffd9ba43f5c..3eb613382e9b7248d6b22454f0bfb3f7263620f3 100644 (file)
@@ -35,7 +35,7 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStre
                $this->setObjectDescription("Debug output for webpages");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index f92356b25ced487148f6fa59de51afac768eb160..0f9ea835e08f41f6e8e1a81e47e910c9ac59d264 100644 (file)
@@ -42,7 +42,7 @@ class ObjectLimits extends BaseFrameworkSystem {
                $this->setObjectDescription("Class for &quot;limiting&quot; other classes. See description for details.");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 087b9429da1de58b31713a2e4113bd397bb34b53..48f83383fe8b7e22213447c9b2cd645235b2fc47 100644 (file)
@@ -40,7 +40,7 @@ class CacheFactory extends BaseFactory {
                $this->setObjectDescription("Factory for cache objects");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 3f8ac7fa61b116b5dd93c4d5b9735f8bec1fc0de..19d0e3d8aa5049504700b312b76eecc5951cca85 100644 (file)
@@ -35,7 +35,7 @@ class ObjectFactory extends BaseFactory {
                $this->setObjectDescription("Simple generic object factory");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 946f96b406f50866916d41553bd67b2c3b13175e..ecd1f286422f9f38294e25dbac5848da3f3d1a1b 100644 (file)
@@ -40,7 +40,7 @@ class WebNewsFactory extends BaseFactory {
                $this->setObjectDescription("Factory for webpages with news");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 006cc5e1d78b03644b3ff0f8aba9cd734b8f625f..3029dcee64c559460175239cd023ace84dd708a0 100644 (file)
@@ -37,7 +37,7 @@ class RulesAcceptedFilter extends BaseFrameworkSystem implements Filterable {
                $this->setObjectDescription("A filter for checking if rules where accepted");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index cb1ac380aa740874030cb3bd8132014913481d6f..fa1f8f42112f095634f1e98c9e809012a3f5f467 100644 (file)
@@ -40,7 +40,7 @@ class FilterChain extends BaseFrameworkSystem {
                $this->setObjectDescription("A filter chain class");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index a6cbe65387e82aadd6e083dc90f7f1204824265d..3ac6d34ac97fd2f8fc2acecb7873d233469b03f5 100644 (file)
@@ -36,7 +36,7 @@ class NullFilter extends BaseFrameworkSystem implements Filterable {
                $this->setObjectDescription("A null filter");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 6c4f74bb689497db9e0366c015ba6dbde4972c04..d7e9a2dd66e45807308a8263d2af1f316d00b8f2 100644 (file)
@@ -38,7 +38,7 @@ class EmailValidatorFilter extends BaseFrameworkSystem implements Filterable {
                $this->setObjectDescription("A filter for Email validation");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 21d0941ee982b44e40af4d23a9f977eb6dfa2af2..a8369d819088c995cdd98bd99a60e91da7ec8b70 100644 (file)
@@ -36,7 +36,7 @@ class PasswordValidatorFilter extends BaseFrameworkSystem implements Filterable
                $this->setObjectDescription("A filter for Password validation");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 85ddfbe187e191f17139516dad4948ea1eb0a94d..67c436fe858f414de68abf175400e0b0c951e375 100644 (file)
@@ -38,7 +38,7 @@ class UserNameValidatorFilter extends BaseFrameworkSystem implements Filterable
                $this->setObjectDescription("A filter for username validation");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index d3fecfc48f40545f8f29d0b1b06987f701933cb9..e71f15137d7a414d7a1ac1f28c38262585ca90d2 100644 (file)
@@ -67,7 +67,7 @@ class WebFormHelper extends BaseHelper {
                $this->setObjectDescription("Helper class for HTML forms");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 0800fea23c151a3f5c37408e86f24ae0488ddb11..1b57ee66195376c9a96ced813f5d12003c859fe2 100644 (file)
@@ -33,7 +33,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil
                $this->setObjectDescription("Universal file I/O stream system");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean-up a little
                $this->removeNumberFormaters();
index f0f2dd8a9a5c0515f400468e23a3e529acab3f5a..79580dfdbe653f602fcd0814a0cfcf9d8eef29db 100644 (file)
@@ -43,7 +43,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
                $this->setObjectDescription("Helper for handling directories");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean-up a little
                $this->removeNumberFormaters();
index 7af6f6fe29857b246dcf8c4fced792db1a62c72b..c86de9a92793f4b73f0547ccf7241c34854cd51f 100644 (file)
@@ -43,7 +43,7 @@ class FrameworkFileInputPointer extends BaseFrameworkSystem {
                $this->setObjectDescription("Handler for reading from files");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean-up a little
                $this->removeNumberFormaters();
index 66e25751392a94d2d4b8c4e0219c8f3d2352bbe5..73cf90804d48f25bc715d079cdce09a9b0e81fc5 100644 (file)
@@ -43,7 +43,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
                $this->setObjectDescription("Handler for writing to files");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean-up a little
                $this->removeNumberFormaters();
@@ -67,12 +67,11 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
         * Create a file pointer based on the given file. The file will also
         * be verified here.
         *
-        * @param               $fileName                               The file name we shall pass
-        *                                                              to fopen()
-        * @param               $mode                           The output mode ('w', 'a' are valid)
+        * @param       $fileName       The file name we shall pass to fopen()
+        * @param       $mode           The output mode ('w', 'a' are valid)
         * @throws      FileIsEmptyException    If the provided file name is empty.
         * @throws      FilePointerNotOpened    If fopen() returns not a file
-        *                                                              resource
+        *                                                                      resource
         * @return      void
         */
        public final static function createFrameworkFileOutputPointer ($fileName, $mode) {
@@ -103,12 +102,12 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
         * Write data to a file pointer
         *
-        * @param               $dataStream     The data stream we shall write to the file
-        * @return      mixed           The result of fwrite()
+        * @param       $dataStream             The data stream we shall write to the file
+        * @return      mixed                   The result of fwrite()
         * @throws      NullPointerException    If the file pointer instance
-        *                                                              is not set by setPointer()
+        *                                                                      is not set by setPointer()
         * @throws      InvalidFileResourceException    If there is being set
-        *                                                                      an invalid file resource
+        *                                                                                      an invalid file resource
         */
        public function writeToFile ($dataStream) {
                if (is_null($this->getPointer())) {
@@ -129,7 +128,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
         *
         * @return      void
         * @throws      NullPointerException    If the file pointer instance
-        *                                                              is not set by setPointer()
+        *                                                                      is not set by setPointer()
         * @throws      InvalidFileResourceException    If there is being set
         */
        public function closeFile () {
@@ -150,7 +149,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
         * Setter for the file pointer
         *
-        * @param               $filePointer    File resource
+        * @param       $filePointer    File resource
         * @return      void
         */
        public final function setPointer ($filePointer) {
@@ -168,7 +167,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
         * Getter for the file pointer
         *
         * @return      $filePointer    The file pointer which shall be a valid
-        *                                              file resource
+        *                                                      file resource
         */
        public final function getPointer () {
                return $this->filePointer;
@@ -177,7 +176,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
         * Setter for file name
         *
-        * @param               $fileName               The new file name
+        * @param       $fileName       The new file name
         * @return      void
         */
        public final function setFileName ($fileName) {
@@ -188,7 +187,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
         * Getter for file name
         *
-        * @return      $fileName               The current file name
+        * @return      $fileName       The current file name
         */
        public final function getFileName () {
                return $this->fileName;
index cb4562e7118dd4c5a485ef74ba7802d119232b1c..19d05972ca3436b1dd60618450aa9abe7fa6a2ed 100644 (file)
@@ -56,7 +56,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage {
                $this->setObjectDescription("Language sub-system");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 00595db8d3c5f5a5b9fb66973a1b9b44130d53ec..e75cf829d43646d23071cc711ea1b53606780040 100644 (file)
@@ -46,7 +46,7 @@ class ConsoleOutput extends BaseFrameworkSystem implements OutputStreamer {
                $this->setObjectDescription("Console output class");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index c6bb27f0216f6ff424bfb40f420ac7e38da0630e..799e9ed2f7e40b74ecd2f0a7810f29ef49f538ce 100644 (file)
@@ -41,7 +41,7 @@ class WebOutput extends BaseFrameworkSystem implements OutputStreamer {
                $this->setObjectDescription("Class for web output e.g. XHTML code");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 3d3c8cab9891c71efebe9f9de21143736e8684f6..a9e1a2a723ab9b93cfccb5f0d384c67663479a8e 100644 (file)
@@ -45,7 +45,7 @@ class Registry extends BaseFrameworkSystem implements Register {
                $this->setObjectDescription("Registry class");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 820a27ac1a048edfe5db36bfa50a3270bcfc39b6..e3bb312f9ea3757b0cb0d4dbd7b70a187a567c30 100644 (file)
@@ -21,7 +21,7 @@
  * 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 HttpRequest extends BaseFrameworkSystem implements Requestable, Iterateable {
+class HttpRequest extends BaseFrameworkSystem implements Requestable {
        /**
         * Array for the request data
         */
@@ -47,7 +47,7 @@ class HttpRequest extends BaseFrameworkSystem implements Requestable, Iterateabl
                $this->setObjectDescription("HTTP request");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 47baef47bfc4cceabea389d6e49aa602e24413cd..bcc6dbb203ace1600677c87302893dcc220002fc 100644 (file)
@@ -40,7 +40,7 @@ class WebCommandResolver extends BaseResolver implements CommandResolver {
                $this->setObjectDescription("Resolver for local web commands");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Set prefix to "Web"
                $this->setCommandPrefix("Web");
index 9e50d94516dfe8a99b592f7a8a73b33257257eaa..7da1934bb8d467f50e73352ff287b26f0d7b38f1 100644 (file)
@@ -45,7 +45,7 @@ class WebControllerResolver extends BaseResolver implements ControllerResolver {
                $this->setObjectDescription("Resolver for local web controllers");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Set prefix to "Web"
                $this->setCommandPrefix("Web");
index 9c04534522dba82a90010ebd9c1e8b4cbfce1d16..074373d1ea00655dec310069f75ebe6e9ef26463 100644 (file)
@@ -63,7 +63,7 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
                $this->setObjectDescription("HTTP response");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 5214c1e603a28eb06497ddca325b91a8118881ee..3d48861ba6fd259debbccf177bef32f3a4441e03 100644 (file)
@@ -50,7 +50,7 @@ class DatabaseResult extends BaseFrameworkSystem {
                $this->setObjectDescription("Database result");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index c5c216d2a9e2f0397abcdcc8e0e799a343ac7ed9..b50af11d865a3f3b051be397b5ff13b96d441ecd 100644 (file)
@@ -56,7 +56,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                $this->setObjectDescription("Standard random number generator");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 09abcca891c76e1fba4964a86be2418d1e91bef5..e1c3bcee1e5fdeb743f6738e685ca67fa246cd1d 100644 (file)
@@ -126,7 +126,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                $this->setObjectDescription("Web template engine");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
index 68533c26343d6857008ca24a4ee7002f9088baf6..2ea13a285e0ba040cccd495faf75ff4146b41d23 100644 (file)
@@ -51,7 +51,7 @@ class User extends BaseFrameworkSystem implements ManageableUser, Registerable {
                $this->setObjectDescription("Generic user class");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
@@ -119,7 +119,7 @@ class User extends BaseFrameworkSystem implements ManageableUser, Registerable {
         * @return      void
         */
        protected final function setEmail ($email) {
-               $this->userName = $email;
+               $this->email = $email;
        }
 
        /**
index e51275160b4aadc8b6d78155e3fb55425ab8b26c..51ea53e2def0ee2cdc14d9b8e7691e4fb0b537c7 100644 (file)
@@ -40,7 +40,7 @@ class CompressorChannel extends BaseMiddleware {
                $this->setObjectDescription("Komprimierungshandler");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        /**
index 87e89f2753122d1d8bbc43f057cdab1fc09f536a..81b402f560469d3bfb72bea15d9d506dfbf68313 100644 (file)
@@ -51,7 +51,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Li
                $this->setObjectDescription("Datenbank-Mittelschicht");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
        }
 
        // Create new database connection layer
@@ -211,7 +211,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Li
                $this->dbLayer->connectToDatabase();
 
                // Ask the database layer
-               $this->dbLayer->insertDataSet($requestInstance);
+               $this->dbLayer->insertDataSet($dataSetInstance);
        }
 }
 
index 9c73bd14d71ef851c07a592abef5a836c93e6c82..bbd96b579b72b53b730dba270ac4bc0f42a8bd4a 100644 (file)
@@ -47,7 +47,7 @@ class DebugMiddleware extends BaseMiddleware {
                $this->setObjectDescription("Debug-Ausgabe-Handler");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Set own instance
                self::$thisInstance = $this;
index 8e1b4b3bd3037a0d3ceb7abc2c6f74920e5ab1d4..071e1d6ecbef9d823ce2fff46c9f71d660450428 100644 (file)
@@ -51,7 +51,7 @@ class FileIoHandler extends BaseMiddleware {
                $this->setObjectDescription("Datei-Ein-/Ausgabe-Handler");
 
                // Create an unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Set own instance
                self::$thisInstance = $this;
index 92612ba04cd83b5c88344b8e944688af6730b483..dc48fe6acce4840bfb3166925dd30756a5d35c88 100644 (file)
@@ -207,5 +207,8 @@ $cfg->setConfigEntry('hash_mask', "%1s:%2s:%3s"); // 1=salt, 2=extra salt, 3=pla
 // CFG: IS-SINGLE-SERVER
 $cfg->setConfigEntry('is_single_server', "Y");
 
+// CFG: POST-REGISTRATION-ACTION
+$cfg->setConfigEntry('post_registration_action', "LoginAfterRegistrationAction");
+
 // [EOF]
 ?>