API Documentation

Captcha/ReCaptcha.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Captcha
subpackage
Adapter
Classes
Zend_Captcha_ReCaptcha

Description

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.

Zend_Captcha_ReCaptcha

Extends from
Zend_Captcha_Base
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Captcha
see
http://recaptcha.net/apidocs/captcha/
subpackage
Adapter
version
$Id: ReCaptcha.php 20096 2010-01-06 02:05:09Z bkarwin $
Constants
MISSING_VALUE
ERR_CAPTCHA
BAD_CAPTCHA
Properties
$_CHALLENGE
$_RESPONSE
$_service
$_serviceParams
$_serviceOptions
$_messageTemplates
Methods
getPrivkey
getPubkey
setPrivkey
setPubkey
__construct
setService
getService
setOption
generate
isValid
render

Description

ReCaptcha adapter

Allows to insert captchas driven by ReCaptcha service

Constants

MISSING_VALUE

 MISSING_VALUE = 'missingValue'

Details

value
missingValue

ERR_CAPTCHA

 ERR_CAPTCHA = 'errCaptcha'

Details

value
errCaptcha

BAD_CAPTCHA

 BAD_CAPTCHA = 'badCaptcha'

Details

value
badCaptcha

Properties

$_CHALLENGE

 $_CHALLENGE = 'recaptcha_challenge_field'

Details

visibility
protected
default
recaptcha_challenge_field
final
false
static
false

$_RESPONSE

 $_RESPONSE = 'recaptcha_response_field'

Details

visibility
protected
default
recaptcha_response_field
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Error messages

Details

$_messageTemplates
array
visibility
protected
default
array
final
false
static
false

$_service

Zend_Service_Recaptcha $_service = ''

Recaptcha service object

Details

$_service
Zend_Service_Recaptcha
visibility
protected
default
final
false
static
false

$_serviceOptions

array $_serviceOptions = 'array'

Options defined by the service

Details

$_serviceOptions
array
visibility
protected
default
array
final
false
static
false

$_serviceParams

array $_serviceParams = 'array'

Parameters defined by the service

Details

$_serviceParams
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( array|Zend_Config $options = null ) : void

Constructor

Arguments
$options
arrayZend_Config
Details
visibility
public
final
false
static
false

generate

generate( ) : string

Generate captcha

Output
string
Details
visibility
public
final
false
static
false
see
Zend_Form_Captcha_Adapter::generate()

getPrivkey

getPrivkey( ) : string

Retrieve ReCaptcha Private key

Output
string
Details
visibility
public
final
false
static
false

getPubkey

getPubkey( ) : string

Retrieve ReCaptcha Public key

Output
string
Details
visibility
public
final
false
static
false

getService

getService( ) : Zend_Service_ReCaptcha

Retrieve ReCaptcha service object

Details
visibility
public
final
false
static
false

isValid

isValid( mixed $value,  $context = null ) : boolean

Validate captcha

Arguments
$value
mixed
$context
Output
boolean
Details
visibility
public
final
false
static
false
see
Zend_Validate_Interface::isValid()

render

render( Zend_View_Interface $view = null, mixed $element = null ) : string

Render captcha

Arguments
$view
Zend_View_Interface
$element
mixed
Output
string
Details
visibility
public
final
false
static
false

setOption

setOption( 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)

Arguments
$key
string
$value
mixed
Details
visibility
public
final
false
static
false

setPrivkey

setPrivkey( string $privkey ) : Zend_Captcha_ReCaptcha

Set ReCaptcha Private key

Arguments
$privkey
string
Details
visibility
public
final
false
static
false

setPubkey

setPubkey( string $pubkey ) : Zend_Captcha_ReCaptcha

Set ReCaptcha public key

Arguments
$pubkey
string
Details
visibility
public
final
false
static
false

setService

setService( Zend_Service_ReCaptcha $service ) : Zend_Captcha_ReCaptcha

Set service object

Arguments
$service
Zend_Service_ReCaptcha
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.