X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fhelper%2Fcaptcha%2Fclass_BaseCaptcha.php;h=8005d064591ae9c49570d8880581d6f235ba801b;hb=f7795764503a5eba4ce861d8601c0707dd97778a;hp=ce4ba7f9dbee63601ebc71833aa334944ce809f3;hpb=78a010fef84895720e796842208f01dfb619c332;p=core.git diff --git a/framework/main/classes/helper/captcha/class_BaseCaptcha.php b/framework/main/classes/helper/captcha/class_BaseCaptcha.php index ce4ba7f9..8005d064 100644 --- a/framework/main/classes/helper/captcha/class_BaseCaptcha.php +++ b/framework/main/classes/helper/captcha/class_BaseCaptcha.php @@ -1,17 +1,19 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -28,18 +30,42 @@ use CoreFramework\Generic\FrameworkInterface; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class BaseCaptcha extends BaseHelper { +abstract class BaseCaptcha extends BaseHelper { + /** + * Instance of a RNG + */ + private $rngInstance = NULL; + /** * Protected constructor * * @param $className Name of the class * @return void */ - protected function __construct ($className) { + protected function __construct (string $className) { // Call parent constructor parent::__construct($className); } + /** + * Setter for RNG instance + * + * @param $rngInstance An instance of a random number generator (RNG) + * @return void + */ + protected final function setRngInstance (RandomNumberGenerator $rngInstance) { + $this->rngInstance = $rngInstance; + } + + /** + * Getter for RNG instance + * + * @return $rngInstance An instance of a random number generator (RNG) + */ + public final function getRngInstance () { + return $this->rngInstance; + } + /** * Initializes the random number generator (RNG) *