Inital commit

This commit is contained in:
2020-11-19 15:36:28 +01:00
parent 71f32f83d3
commit 66ce4ee218
18077 changed files with 2166122 additions and 35184 deletions

View File

@@ -0,0 +1,80 @@
<?php
namespace ReCaptcha\Event;
use Thelia\Core\Event\ActionEvent;
class ReCaptchaCheckEvent extends ActionEvent
{
protected $captchaResponse = null;
protected $remoteIp = null;
/** @var boolean */
protected $human = false;
public function __construct($captchaResponse = null, $remoteIp = null)
{
if (null !== $captchaResponse) {
$this->captchaResponse = $captchaResponse;
}
if (null !== $remoteIp) {
$this->remoteIp = $remoteIp;
}
}
/**
* @return null
*/
public function getCaptchaResponse()
{
return $this->captchaResponse;
}
/**
* @param null $captchaResponse
* @return ReCaptchaCheckEvent
*/
public function setCaptchaResponse($captchaResponse)
{
$this->captchaResponse = $captchaResponse;
return $this;
}
/**
* @return null
*/
public function getRemoteIp()
{
return $this->remoteIp;
}
/**
* @param null $remoteIp
* @return ReCaptchaCheckEvent
*/
public function setRemoteIp($remoteIp)
{
$this->remoteIp = $remoteIp;
return $this;
}
/**
* @return bool
*/
public function isHuman()
{
return $this->human;
}
/**
* @param bool $human
* @return ReCaptchaCheckEvent
*/
public function setHuman($human)
{
$this->human = $human;
return $this;
}
}

View File

@@ -0,0 +1,8 @@
<?php
namespace ReCaptcha\Event;
class ReCaptchaEvents
{
const CHECK_CAPTCHA_EVENT = "check_captcha_event";
}