]> git.mxchange.org Git - core.git/commitdiff
Introduced new setter/getter and generic interface:
authorRoland Häder <roland@mxchange.org>
Tue, 29 Mar 2011 16:29:03 +0000 (16:29 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 29 Mar 2011 16:29:03 +0000 (16:29 +0000)
- Added a generic Helper interface
- Moved some interfaces to maintain hierarchical directory style
- Used that interface in the generic setter which has been moved from the
  BaseCaptcha class to BaseFrameworkSystem
- Added source instance, setter and getter from 'hub' project
- TODOs.txt updated

.gitattributes
docs/TODOs.txt
inc/classes/interfaces/helper/class_HelpableLogin.php
inc/classes/interfaces/helper/class_HelpableTemplate.php
inc/classes/interfaces/helper/class_Helper.php [new file with mode: 0644]
inc/classes/interfaces/helper/login/.htaccess [new file with mode: 0644]
inc/classes/interfaces/helper/login/class_HelpableLogin.php [new file with mode: 0644]
inc/classes/interfaces/helper/template/.htaccess [new file with mode: 0644]
inc/classes/interfaces/helper/template/class_HelpableTemplate.php [new file with mode: 0644]
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/helper/captcha/class_BaseCaptcha.php

index bc49187fccc5db98ab2a5573ce23d9452aa7110a..aaea3ed34015f1a147af3a02b8a1e11a8b34dfb9 100644 (file)
@@ -172,6 +172,11 @@ inc/classes/interfaces/filter/class_Filterable.php -text svneol=unset#text/plain
 inc/classes/interfaces/helper/.htaccess -text svneol=unset#text/plain
 inc/classes/interfaces/helper/class_HelpableLogin.php -text svneol=unset#text/plain
 inc/classes/interfaces/helper/class_HelpableTemplate.php -text svneol=unset#text/plain
 inc/classes/interfaces/helper/.htaccess -text svneol=unset#text/plain
 inc/classes/interfaces/helper/class_HelpableLogin.php -text svneol=unset#text/plain
 inc/classes/interfaces/helper/class_HelpableTemplate.php -text svneol=unset#text/plain
+inc/classes/interfaces/helper/class_Helper.php svneol=native#text/plain
+inc/classes/interfaces/helper/login/.htaccess svneol=native#text/plain
+inc/classes/interfaces/helper/login/class_HelpableLogin.php svneol=native#text/plain
+inc/classes/interfaces/helper/template/.htaccess svneol=native#text/plain
+inc/classes/interfaces/helper/template/class_HelpableTemplate.php svneol=native#text/plain
 inc/classes/interfaces/io/.htaccess -text svneol=unset#text/plain
 inc/classes/interfaces/io/class_Streamable.php -text svneol=unset#text/plain
 inc/classes/interfaces/io/file/.htaccess -text svneol=unset#text/plain
 inc/classes/interfaces/io/.htaccess -text svneol=unset#text/plain
 inc/classes/interfaces/io/class_Streamable.php -text svneol=unset#text/plain
 inc/classes/interfaces/io/file/.htaccess -text svneol=unset#text/plain
index 07e8e2c38a25e1c33fb8f79b223da35940e68508..354a8ce2f834eef0952f521edc697f708b8e2d9f 100644 (file)
@@ -3,10 +3,10 @@
 ./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo             Try to rewrite user/guest login classes and mark this exception as deprecated
 ./inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo             Rename this class to NoFoundEntryException
 ./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo              Find a better name for this interface
 ./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo             Try to rewrite user/guest login classes and mark this exception as deprecated
 ./inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo             Rename this class to NoFoundEntryException
 ./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo              Find a better name for this interface
-./inc/classes/main/class_BaseFrameworkSystem.php:1141:  * @todo        Write a logging mechanism for productive mode
-./inc/classes/main/class_BaseFrameworkSystem.php:1155:                 // @TODO Finish this part!
-./inc/classes/main/class_BaseFrameworkSystem.php:159:  // @todo Try to clean these constants up
-./inc/classes/main/class_BaseFrameworkSystem.php:318:   * @todo        SearchableResult and UpdateableResult shall have a super interface to use here
+./inc/classes/main/class_BaseFrameworkSystem.php:1178:  * @todo        Write a logging mechanism for productive mode
+./inc/classes/main/class_BaseFrameworkSystem.php:1192:                 // @TODO Finish this part!
+./inc/classes/main/class_BaseFrameworkSystem.php:169:  // @todo Try to clean these constants up
+./inc/classes/main/class_BaseFrameworkSystem.php:355:   * @todo        SearchableResult and UpdateableResult shall have a super interface to use here
 ./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64:       * @todo        Add some stuff here: Some personal data, app/game related data
 ./inc/classes/main/commands/web/class_WebProblemCommand.php:58:         * @todo        0% done
 ./inc/classes/main/commands/web/class_WebStatusCommand.php:58:  * @todo        0% done
 ./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64:       * @todo        Add some stuff here: Some personal data, app/game related data
 ./inc/classes/main/commands/web/class_WebProblemCommand.php:58:         * @todo        0% done
 ./inc/classes/main/commands/web/class_WebStatusCommand.php:58:  * @todo        0% done
 ./inc/classes/exceptions/language/class_MissingLanguageHandlerException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/main/class_ClassNotFoundException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/language/class_MissingLanguageHandlerException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/main/class_ClassNotFoundException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php:2:// @DEPRECATED
+./inc/classes/interfaces/helper/class_HelpableLogin.php:2:// @DEPRECATED
+./inc/classes/interfaces/helper/class_HelpableTemplate.php:2:// @DEPRECATED
 ./inc/classes.php:9: * @deprecated
 ./inc/database.php:10: * @deprecated
 ./inc/file_io.php:2:// @DEPRECATED
 ./inc/classes.php:9: * @deprecated
 ./inc/database.php:10: * @deprecated
 ./inc/file_io.php:2:// @DEPRECATED
index cf73944c66972c2030a6ca0b2b3c57c26c44afab..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,36 +1,3 @@
 <?php
 <?php
-/**
- * A helper interface for logins
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface HelpableLogin extends FrameworkInterface {
-       /**
-        * Execute the login request by given response instance. This instance can
-        * be used for sending cookies or at least the session id out.
-        *
-        * @param       $responseInstance       An instance of a Responseable class
-        * @return      void
-        */
-       function executeLogin (Responseable $responseInstance);
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
 ?>
index 64551ce0d015f775d742509e8dd10f6654ed8467..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,34 +1,3 @@
 <?php
 <?php
-/**
- * A helper interface for template helper ;)
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface HelpableTemplate extends FrameworkInterface {
-       /**
-        * Flush the content out,e g. to a template variable
-        *
-        * @return      void
-        */
-       function flushContent ();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
 ?>
diff --git a/inc/classes/interfaces/helper/class_Helper.php b/inc/classes/interfaces/helper/class_Helper.php
new file mode 100644 (file)
index 0000000..9eabb07
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * A Helper interface
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface Helper extends FrameworkInterface {
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/interfaces/helper/login/.htaccess b/inc/classes/interfaces/helper/login/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/helper/login/class_HelpableLogin.php b/inc/classes/interfaces/helper/login/class_HelpableLogin.php
new file mode 100644 (file)
index 0000000..e405898
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * A helper interface for logins
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface HelpableLogin extends Helper {
+       /**
+        * Execute the login request by given response instance. This instance can
+        * be used for sending cookies or at least the session id out.
+        *
+        * @param       $responseInstance       An instance of a Responseable class
+        * @return      void
+        */
+       function executeLogin (Responseable $responseInstance);
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/interfaces/helper/template/.htaccess b/inc/classes/interfaces/helper/template/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/helper/template/class_HelpableTemplate.php b/inc/classes/interfaces/helper/template/class_HelpableTemplate.php
new file mode 100644 (file)
index 0000000..f81669d
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+/**
+ * A helper interface for template helper ;)
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface HelpableTemplate extends Helper {
+       /**
+        * Flush the content out,e g. to a template variable
+        *
+        * @return      void
+        */
+       function flushContent ();
+}
+
+// [EOF]
+?>
index 7d5ac4a8578bd043d1b3ccc55c79b264b1657b8d..0eaddce17e5e361d872b15c72af8c3551ee0ee73 100644 (file)
@@ -128,6 +128,16 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        private $databaseInstance = null;
 
         */
        private $databaseInstance = null;
 
+       /**
+        * A helper instance for the form
+        */
+       private $helperInstance = null;
+
+       /**
+        * An instance of a source
+        */
+       private $sourceInstance = null;
+
        /**
         * The real class name
         */
        /**
         * The real class name
         */
@@ -1466,6 +1476,44 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                return $this->socketResource;
        }
 
                return $this->socketResource;
        }
 
+       /**
+        * Setter for helper instance
+        *
+        * @param       $helperInstance         An instance of a helper class
+        * @return      void
+        */
+       protected final function setHelperInstance (Helper $helperInstance) {
+               $this->helperInstance = $helperInstance;
+       }
+
+       /**
+        * Getter for helper instance
+        *
+        * @return      $helperInstance         An instance of a helper class
+        */
+       public final function getHelperInstance () {
+               return $this->helperInstance;
+       }
+
+       /**
+        * Setter for a Sourceable instance
+        *
+        * @param       $sourceInstance The Sourceable instance
+        * @return      void
+        */
+       protected final function setSourceInstance (Sourceable $sourceInstance) {
+               $this->sourceInstance = $sourceInstance;
+       }
+
+       /**
+        * Getter for a Sourceable instance
+        *
+        * @param       $sourceInstance The Sourceable instance
+        */
+       protected final function getSourceInstance () {
+               return $this->sourceInstance;
+       }
+
        /**
         * Setter for raw package Data
         *
        /**
         * Setter for raw package Data
         *
index 72930291611c5e64cc9922867a52247691cacf64..313ef4c69b9c75c99d67e1c59700f0bc7eea0000 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseCaptcha extends BaseHelper {
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseCaptcha extends BaseHelper {
-       /**
-        * A helper instance for the form
-        */
-       private $helperInstance = null;
-
        /**
         * Protected constructor
         *
        /**
         * Protected constructor
         *
@@ -48,25 +43,6 @@ class BaseCaptcha extends BaseHelper {
                // Get an RNG from factory
                $this->setRngInstance(ObjectFactory::createObjectByConfiguredName('rng_class', array($extraInstance)));
        }
                // Get an RNG from factory
                $this->setRngInstance(ObjectFactory::createObjectByConfiguredName('rng_class', array($extraInstance)));
        }
-
-       /**
-        * Setter for helper instance
-        *
-        * @param       $helperInstance         An instance of a helper class
-        * @return      void
-        */
-       protected final function setHelperInstance (HelpableTemplate $helperInstance) {
-               $this->helperInstance = $helperInstance;
-       }
-
-       /**
-        * Getter for helper instance
-        *
-        * @return      $helperInstance         An instance of a helper class
-        */
-       public final function getHelperInstance () {
-               return $this->helperInstance;
-       }
 }
 
 // [EOF]
 }
 
 // [EOF]