protected function getQuestion()
{
$int1 = rand(1, 9);
$int2 = rand(1, 9);
$question = $GLOBALS['TL_LANG']['SEC']['question' . rand(1, 3)];
$question = sprintf($question, $int1, $int2);
/** @var SessionInterface $objSession */
$objSession = \System::getContainer()->get('session');
$objSession->set('captcha_' . $this->strId, array('sum' => $int1 + $int2, 'key' => $this->strCaptchaKey, 'time' => time()));
$strEncoded = '';
$arrCharacters = Utf8::str_split($question);
foreach ($arrCharacters as $strCharacter) {
$strEncoded .= sprintf('&#%s;', Utf8::ord($strCharacter));
}
return $strEncoded;
}