*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* @param $extraInstance An extra instance, just for better hash data
* @return $captchaInstance An instance of this captcha class
*/
- public final static function createGraphicalCodeCaptcha (HelpableTemplate $helperInstance, FrameworkInterface $extraInstance = null) {
+ public static final function createGraphicalCodeCaptcha (HelpableTemplate $helperInstance, FrameworkInterface $extraInstance = NULL) {
// Get a new instance
$captchaInstance = new GraphicalCodeCaptcha();
*/
public function initiateCaptcha () {
// Get total length
- $captchaLength = $this->getConfigInstance()->readConfig('captcha_string_length');
+ $captchaLength = $this->getConfigInstance()->getConfigEntry('captcha_string_length');
// Get max string length
- $strLength = $this->getConfigInstance()->readConfig('random_string_length');
+ $strLength = $this->getConfigInstance()->getConfigEntry('random_string_length');
// Calculate starting position based on random place
$start = $this->getRngInstance()->randomNumber(0, ($strLength - $captchaLength));
$captchaString = substr($base64String, $start, $captchaLength);
// Get all characters we want to replace
- $searchChars = $this->getConfigInstance()->readConfig('captcha_search_chars');
+ $searchChars = $this->getConfigInstance()->getConfigEntry('captcha_search_chars');
// Get fixed salt and use it as "replacement characters"
$replaceChars = $this->getRngInstance()->getExtraSalt();