Captcha/ReCaptcha.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Captcha  
Subpackage
Adapter  

\Zend_Captcha_ReCaptcha

Package: Zend_Captcha\Adapter
ReCaptcha adapter
Allows to insert captchas driven by ReCaptcha service
Parent(s)
\Zend_Captcha_Base < \Zend_Validate_Abstract
See
 
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id$  

Constants

>VConstant  MISSING_VALUE = 'missingValue'
>VConstant  ERR_CAPTCHA = 'errCaptcha'
>VConstant  BAD_CAPTCHA = 'badCaptcha'

Properties

>VPropertyprotected$_CHALLENGE = 'recaptcha_challenge_field'
Default value'recaptcha_challenge_field'Details
Type
n/a
>VPropertyprotected$_RESPONSE = 'recaptcha_response_field'
Default value'recaptcha_response_field'Details
Type
n/a
>VPropertyprotectedarray $_messageTemplates = array(self::MISSING_VALUE => 'Missing captcha fields', self::ERR_CAPTCHA => 'Failed to validate captcha', self::BAD_CAPTCHA => 'Captcha value is wrong: %value%')
Error messages
Default valuearray(self::MISSING_VALUE => 'Missing captcha fields', self::ERR_CAPTCHA => 'Failed to validate captcha', self::BAD_CAPTCHA => 'Captcha value is wrong: %value%')Details
Type
array
>VPropertyprotected\Zend_Service_Recaptcha $_service
Recaptcha service object
>VPropertyprotectedarray $_serviceOptions = array()
Options defined by the service
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_serviceParams = array()
Parameters defined by the service
Default valuearray()Details
Type
array

Methods

methodpublic__construct(array | \Zend_Config $options = null) : void

Constructor

Parameters
NameTypeDescription
$optionsarray | \Zend_Config
methodpublicgenerate() : string

Generate captcha

Returns
TypeDescription
string
Details
See
 
methodpublicgetDecorator() : string

Get captcha decorator

Returns
TypeDescription
string
methodpublicgetPrivkey() : string

Retrieve ReCaptcha Private key

Returns
TypeDescription
string
methodpublicgetPubkey() : string

Retrieve ReCaptcha Public key

Returns
TypeDescription
string
methodpublicgetService() : \Zend_Service_ReCaptcha

Retrieve ReCaptcha service object

Returns
TypeDescription
\Zend_Service_ReCaptcha
methodpublicisValid(mixed $value,  $context = null) : boolean

Validate captcha

Parameters
NameTypeDescription
$valuemixed
$context
Returns
TypeDescription
boolean
Details
See
 
methodpublicrender(\Zend_View_Interface $view = null, mixed $element = null) : string

Render captcha

Parameters
NameTypeDescription
$view\Zend_View_Interface
$elementmixed
Returns
TypeDescription
string
methodpublicsetOption(string $key, mixed $value) : \Zend_Captcha_ReCaptcha

Set option

If option is a service parameter, proxies to the service. The same goes for any service options (distinct from service params)
Parameters
NameTypeDescription
$keystring
$valuemixed
Returns
TypeDescription
\Zend_Captcha_ReCaptcha
methodpublicsetPrivkey(string $privkey) : \Zend_Captcha_ReCaptcha

Set ReCaptcha Private key

Parameters
NameTypeDescription
$privkeystring
Returns
TypeDescription
\Zend_Captcha_ReCaptcha
methodpublicsetPubkey(string $pubkey) : \Zend_Captcha_ReCaptcha

Set ReCaptcha public key

Parameters
NameTypeDescription
$pubkeystring
Returns
TypeDescription
\Zend_Captcha_ReCaptcha
methodpublicsetService(\Zend_Service_ReCaptcha $service) : \Zend_Captcha_ReCaptcha

Set service object

Parameters
NameTypeDescription
$service\Zend_Service_ReCaptcha
Returns
TypeDescription
\Zend_Captcha_ReCaptcha
Documentation was generated by phpDocumentor 2.2.0 .