Services_ReCaptcha
[ class tree: Services_ReCaptcha ] [ index: Services_ReCaptcha ] [ all elements ]

Class: Services_ReCaptcha_Base

Source Location: /Services_ReCaptcha-1.0.3/Services/ReCaptcha/Base.php

Class Overview


Base class for Services_ReCaptcha and Services_ReCaptcha_MailHide.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2008-2009 David Jean Louis

Variables

Methods


Child classes:

Services_ReCaptcha
PHP5 interface to the reCATCHA API.
Services_ReCaptcha_MailHide
PHP5 interface to the reCATCHA MailHide API.

Inherited Variables

Inherited Methods


Class Details

[line 44]
Base class for Services_ReCaptcha and Services_ReCaptcha_MailHide.


[ Top ]


Class Variables

$apiPrivateKey =

[line 67]

reCAPTCHA/reCAPTCHA Mailhide API private key.
  • Access: protected

Type:   string


[ Top ]

$apiPublicKey =

[line 60]

reCAPTCHA/reCAPTCHA Mailhide API public key.
  • Access: protected

Type:   string


[ Top ]

$apiURL =

[line 53]

reCAPTCHA/reCAPTCHA Mailhide API URL.
  • Access: public

Type:   string


[ Top ]

$options = array()

[line 74]

Array of options.
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 89]

void __construct( string $pubKey, string $privKey, [ $options = array()])

Constructor, you must pass a valid public and private API key, and optionnaly an array of options.
  • Access: public

Overridden in child classes as:

Services_ReCaptcha::__construct()
Constructor, you must pass a valid public and private API key.
Services_ReCaptcha_MailHide::__construct()
Constructor, you must pass a valid public and private API key.

Parameters:

string   $pubKey     The public API key (mandatory)
string   $privKey     The private API key (mandatory)
array   $options     An array of options (optional)

[ Top ]

getHTML   [line 125]

string getHTML( )

Returns the corresponding HTML code.
  • Abstract:
  • Access: public

Overridden in child classes as:

Services_ReCaptcha::getHTML()
Returns the HTML code to insert into your form.
Services_ReCaptcha_MailHide::getHTML()
Returns the HTML code snippet that will hide your email.

[ Top ]

getOption   [line 137]

mixed getOption( string $option)

Returns an option from Services_ReCaptcha::$options.
  • Return: The value of the option
  • Access: public

Parameters:

string   $option     Name of option

[ Top ]

getOptions   [line 172]

array getOptions( )

Returns the Services_ReCaptcha::$options array.
  • Return: The options array
  • Access: public

[ Top ]

setOption   [line 156]

Services_ReCaptcha_Base setOption( string $option, mixed $value)

Sets an option in Services_ReCaptcha::$options and returns the current Services_ReCaptcha_Base instance.
  • Access: public

Parameters:

string   $option     Name of option
mixed   $value     Value of option

[ Top ]

setOptions   [line 189]

Services_ReCaptcha_Base setOptions( $options)

Sets a number of options at once in Services_ReCaptcha::$options and returns the current Services_ReCaptcha_Base instance.
  • See: Services_ReCaptcha::setOption()
  • Access: public

Parameters:

array   $options     Associative array of options name/value

[ Top ]

__toString   [line 108]

string __toString( )

Returns the corresponding HTML code, this is a "magic" shortcut to the getHTML() method.

[ Top ]


Documentation generated on Thu, 28 Apr 2011 21:30:02 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.