API Documentation

Zend/Captcha/ReCaptcha.php

Show: inherited
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-2012 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
\http://recaptcha.net/apidocs/captcha/  
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id: ReCaptcha.php 24594 2012-01-05 21:27:01Z matthew $  

Constants

Constant  MISSING_VALUE = 'missingValue'
Constant  ERR_CAPTCHA = 'errCaptcha'
Constant  BAD_CAPTCHA = 'badCaptcha'

Properties

Propertyprotected  $_CHALLENGE= ''recaptcha_challenge_field''
Default value'recaptcha_challenge_field'Details
Type
Propertyprotected  $_RESPONSE= ''recaptcha_response_field''
Default value'recaptcha_response_field'Details
Type
Propertyprotectedarray  $_messageTemplates= 'array( self::MISSING_VALUE => 'Missing captcha fields''

Error messages

Default valuearray( self::MISSING_VALUE => 'Missing captcha fields'Details
Type
array
Propertyprotected\Zend_Service_Recaptcha  $_service= ''

Recaptcha service object

Details
Type
\Zend_Service_Recaptcha
Propertyprotectedarray  $_serviceOptions= 'array()'

Options defined by the service

Default valuearray()Details
Type
array
Propertyprotectedarray  $_serviceParams= 'array()'

Parameters defined by the service

Default valuearray()Details
Type
array

Methods

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

Constructor

Parameters
Name Type Description
$options array|\Zend_Config
methodpublicgenerate( ) : string

Generate captcha

Returns
Type Description
string
Details
See
\Zend_Form_Captcha_Adapter::generate()  
methodpublicgetDecorator( ) : string

Get captcha decorator

Returns
Type Description
string
methodpublicgetPrivkey( ) : string

Retrieve ReCaptcha Private key

Returns
Type Description
string
methodpublicgetPubkey( ) : string

Retrieve ReCaptcha Public key

Returns
Type Description
string
methodpublicgetService( ) : \Zend_Service_ReCaptcha

Retrieve ReCaptcha service object

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

Validate captcha

Parameters
Name Type Description
$value mixed
$context
Returns
Type Description
boolean
Details
See
\Zend_Validate_Interface::isValid()  
methodpublicrender( \Zend_View_Interface $view = null, mixed $element = null ) : string

Render captcha

Parameters
Name Type Description
$view \Zend_View_Interface
$element mixed
Returns
Type Description
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
Name Type Description
$key string
$value mixed
Returns
Type Description
\Zend_Captcha_ReCaptcha
methodpublicsetPrivkey( string $privkey ) : \Zend_Captcha_ReCaptcha

Set ReCaptcha Private key

Parameters
Name Type Description
$privkey string
Returns
Type Description
\Zend_Captcha_ReCaptcha
methodpublicsetPubkey( string $pubkey ) : \Zend_Captcha_ReCaptcha

Set ReCaptcha public key

Parameters
Name Type Description
$pubkey string
Returns
Type Description
\Zend_Captcha_ReCaptcha
methodpublicsetService( \Zend_Service_ReCaptcha $service ) : \Zend_Captcha_ReCaptcha

Set service object

Parameters
Name Type Description
$service \Zend_Service_ReCaptcha
Returns
Type Description
\Zend_Captcha_ReCaptcha
Documentation was generated by DocBlox 0.15.1.