src/Framework/Form/Element/Input/Captcha.php
public function createNewToken($captcha = null, $answer = null, $expire = 300)
    {
        if ((null === $captcha) || (null === $answer)) {
            $captcha = $this->generateEquation();
            $answer  = $this->evaluateEquation($captcha);
        }
        $this->token = [
            'captcha' => $captcha,
            'answer'  => $answer,
            'expire'  => (int)$expire,
            'start'   => time()
        ];
        $_SESSION['pop_captcha'] = serialize($this->token);
        return $this;
    }
public function createNewToken($captcha = null, $answer = null, $expire = 300)
    {
        if ((null === $captcha) || (null === $answer)) {
            $captcha = $this->generateEquation();
            $answer  = $this->evaluateEquation($captcha);
        }
        $this->token = [
            'captcha' => $captcha,
            'answer'  => $answer,
            'expire'  => (int)$expire,
            'start'   => time()
        ];
        $_SESSION['pop_captcha'] = serialize($this->token);
        return $this;
    }
public function createNewToken ( $ captcha = null , $ answer = null , $ expire = 300 ) { if ( ( null === $ captcha ) || ( null === $ answer ) ) { $ captcha = $ this -> generateEquation ( ) ; $ answer = $ this -> evaluateEquation ( $ captcha ) ; } $ this -> token = [ 'captcha' => $ captcha , 'answer' => $ answer , 'expire' => ( int ) $ expire , 'start' => time ( ) ] ; $ _SESSION [ 'pop_captcha' ] = serialize ( $ this -> token ) ; return $ this ; }
Set the token of the CAPTCHA form element

@param  string $captcha
@param  string $answer
@param  int    $expire
@return Captcha
Set the token of the CAPTCHA form element