/**
* A general captcha
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.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
* 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
- */
- private $rngInstance = null;
-
/**
* Protected constructor
*
* @param $extraInstance An extra instance, just for better hash data
* @return void
*/
- protected final function initializeRandomNumberGenerator (FrameworkInterface $extraInstance = null) {
+ protected final function initializeRandomNumberGenerator (FrameworkInterface $extraInstance = NULL) {
// Get an RNG from factory
- $this->rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class', array($extraInstance));
- }
-
- /**
- * Getter for RNG instance
- *
- * @return $rngInstance An instance of a random number generator (RNG)
- */
- 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;
+ $this->setRngInstance(ObjectFactory::createObjectByConfiguredName('rng_class', array($extraInstance)));
}
}