PHP Class Anhskohbo\NoCaptcha\NoCaptcha

Afficher le fichier Open project: anhskohbo/no-captcha

Protected Properties

Свойство Type Description
$secret string The recaptcha secret key.
$sitekey string The recaptcha sitekey key.

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

__construct() public méthode

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

buildAttributes() protected méthode

Build HTML attributes.
protected buildAttributes ( array $attributes ) : string
$attributes array
Résultat string

display() public méthode

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

sendRequestVerify() protected méthode

Send verify request.
protected sendRequestVerify ( array $query = [] ) : array
$query array
Résultat array

verifyRequest() public méthode

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

verifyResponse() public méthode

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

Property Details

$secret protected_oe property

The recaptcha secret key.
protected string $secret
Résultat string

$sitekey protected_oe property

The recaptcha sitekey key.
protected string $sitekey
Résultat string