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

Class: HTML_QuickForm_CAPTCHA_Image

Source Location: /HTML_QuickForm_CAPTCHA-0.3.0/HTML/QuickForm/CAPTCHA/Image.php

Class Overview

HTML_QuickForm_input
   |
   --HTML_QuickForm_CAPTCHA
      |
      --HTML_QuickForm_CAPTCHA_Image

Element for HTML_QuickForm to display a CAPTCHA image


Author(s):

Version:

  • Release: 0.3.0

Copyright:

  • 2006-2008 by Philippe Jausions / 11abacus

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm_CAPTCHA

HTML_QuickForm_CAPTCHA::HTML_QuickForm_CAPTCHA()
Class constructor
HTML_QuickForm_CAPTCHA::destroy()
Destroys the CAPTCHA instance to prevent reuse
HTML_QuickForm_CAPTCHA::exportValue()
Returns the answer/phrase of the CAPTCHA
HTML_QuickForm_CAPTCHA::getValue()
Returns the answer/phrase of the CAPTCHA
HTML_QuickForm_CAPTCHA::setPhrase()
Sets the CAPTCHA question/phrase
HTML_QuickForm_CAPTCHA::toHtml()
Returns the HTML for the CAPTCHA
HTML_QuickForm_CAPTCHA::_initCAPTCHA()
Initializes the CAPTCHA instance (if needed)

Class Details

[line 61]
Element for HTML_QuickForm to display a CAPTCHA image

The HTML_QuickForm_CAPTCHA package adds an element to the HTML_QuickForm package to display a CAPTCHA image.

Options for the element

  • 'width' (integer) width of the image,
  • 'height' (integer) height of the image,
  • 'imageOptions' (array) options passed to the Image_Text constructor,
  • 'callback' (string) URL of callback script that will generate and output the image itself,
  • 'alt' (string) the alt text for the image,
  • 'sessionVar' (string) name of session variable containing the Text_CAPTCHA instance (defaults to _HTML_QuickForm_CAPTCHA.)

This package requires the use of a PHP session.



[ Top ]


Class Variables

$_CAPTCHA_driver =  'Image'

[line 85]

CAPTCHA driver
  • Access: protected

Type:   string
Overrides:   Array


[ Top ]

$_options = array(
            'sessionVar'   => '_HTML_QuickForm_CAPTCHA',
            'width'        => '200',
            'height'       => '80',
            'alt'          => 'Click to view another image',
            'callback'     => '',
            'imageOptions' => null,
            'phrase'       => null,
            )

[line 69]

Default options
  • Access: protected

Type:   array
Overrides:   Array


[ Top ]



Method Detail

getOnclickJs   [line 141]

string getOnclickJs( string $imageName)

Creates the javascript for the onclick event which will reload a new CAPTCHA image
  • Access: public

Parameters:

string   $imageName   —  The image name/id

[ Top ]

toHtml   [line 93]

string toHtml( )

Returns the HTML for the CAPTCHA image
  • Access: public

Overrides HTML_QuickForm_CAPTCHA::toHtml() (Returns the HTML for the CAPTCHA)
[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:21:02 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.