PHP Класс Anhskohbo\NoCaptcha\NoCaptcha

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$secret string The recaptcha secret key.
$sitekey string The recaptcha sitekey key.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
buildAttributes ( array $attributes ) : string Build HTML attributes.
sendRequestVerify ( array $query = [] ) : array Send verify request.

Описание методов

__construct() публичный метод

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

buildAttributes() защищенный метод

Build HTML attributes.
protected buildAttributes ( array $attributes ) : string
$attributes array
Результат string

display() публичный метод

Render HTML captcha.
public display ( $attributes = [], $lang = null ) : string
Результат string

sendRequestVerify() защищенный метод

Send verify request.
protected sendRequestVerify ( array $query = [] ) : array
$query array
Результат array

verifyRequest() публичный метод

Verify no-captcha response by Symfony Request.
public verifyRequest ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
Результат boolean

verifyResponse() публичный метод

Verify no-captcha response.
public verifyResponse ( string $response, string $clientIp = null ) : boolean
$response string
$clientIp string
Результат boolean

Описание свойств

$secret защищенное свойство

The recaptcha secret key.
protected string $secret
Результат string

$sitekey защищенное свойство

The recaptcha sitekey key.
protected string $sitekey
Результат string