PHP Class Anhskohbo\NoCaptcha\NoCaptcha

Mostrar archivo Open project: anhskohbo/no-captcha

Protected Properties

Property Type Description
$secret string The recaptcha secret key.
$sitekey string The recaptcha sitekey key.

Public Methods

Method Description
__construct ( string $secret, string $sitekey ) NoCaptcha.
display ( $attributes = [], $lang = null ) : string Render HTML captcha.
getJsLink ( $lang = null ) : string Get recaptcha js link.
verifyRequest ( Request $request ) : boolean Verify no-captcha response by Symfony Request.
verifyResponse ( string $response, string $clientIp = null ) : boolean Verify no-captcha response.

Protected Methods

Method Description
buildAttributes ( array $attributes ) : string Build HTML attributes.
sendRequestVerify ( array $query = [] ) : array Send verify request.

Method Details

__construct() public method

NoCaptcha.
public __construct ( string $secret, string $sitekey )
$secret string
$sitekey string

buildAttributes() protected method

Build HTML attributes.
protected buildAttributes ( array $attributes ) : string
$attributes array
return string

display() public method

Render HTML captcha.
public display ( $attributes = [], $lang = null ) : string
return string

sendRequestVerify() protected method

Send verify request.
protected sendRequestVerify ( array $query = [] ) : array
$query array
return array

verifyRequest() public method

Verify no-captcha response by Symfony Request.
public verifyRequest ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
return boolean

verifyResponse() public method

Verify no-captcha response.
public verifyResponse ( string $response, string $clientIp = null ) : boolean
$response string
$clientIp string
return boolean

Property Details

$secret protected_oe property

The recaptcha secret key.
protected string $secret
return string

$sitekey protected_oe property

The recaptcha sitekey key.
protected string $sitekey
return string