]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/helper/captcha/class_BaseCaptcha.php
generateUniqueId() and more useless/deprecated methods removed, code speed-up, link...
[shipsimu.git] / inc / classes / main / helper / captcha / class_BaseCaptcha.php
index 2da834e9fe681dc38bb1f6f199d747f5c2a101df..8cb138ef92ce5f20e50c4b2895e9c1011f5e247a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @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
  *
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseCaptcha extends BaseHelper {
+       /**
+        * A helper instance for the form
+        */
+       private $helperInstance = null;
+
        /**
         * Instance of an RNG
         */
@@ -36,10 +41,6 @@ class BaseCaptcha extends BaseHelper {
        protected function __construct ($className) {
                // Call parent constructor
                parent::__construct($className);
-
-               // Clean up a little
-               $this->removeNumberFormaters();
-               $this->removeSystemArray();
        }
 
        /**
@@ -54,13 +55,32 @@ class BaseCaptcha extends BaseHelper {
        }
 
        /**
-        * Protected getter for RNG instance
+        * Getter for RNG instance
         *
         * @return      $rngInstance    An instance of a random number generator (RNG)
         */
-       protected final function getRngInstance () {
+       public final function getRngInstance () {
                return $this->rngInstance;
        }
+
+       /**
+        * 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]