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

Class: Text_CAPTCHA

Source Location: /Text_CAPTCHA-1.0.2/Text/CAPTCHA.php

Class Overview


Text_CAPTCHA - creates a CAPTCHA for Turing tests.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
Text_CAPTCHA - creates a CAPTCHA for Turing tests.

Class to create a Turing test for websites by creating an image, ASCII art or something else with some (obfuscated) characters.



[ Top ]


Method Detail

__construct (Constructor)   [line 58]

Text_CAPTCHA __construct( Text_CAPTCHA_Driver $driver)

Constructor for the TEXT_CAPTCHA object with the given driver.
  • Throws: Text_CAPTCHA_Exception no driver given

Parameters:

Text_CAPTCHA_Driver   $driver     driver

[ Top ]

factory   [line 76]

Text_CAPTCHA factory( string $driver)

Create a new Text_CAPTCHA object.
  • Return: a newly created Text_CAPTCHA object
  • Throws: Text_CAPTCHA_Exception when driver could not be loaded
  • Access: public

Parameters:

string   $driver     name of driver class to initialize

[ Top ]

generate   [line 104]

void generate( [boolean|string $newPhrase = false])

Create random CAPTCHA phrase
  • Throws: Text_CAPTCHA_Exception when driver is not initialized
  • Access: public

Parameters:

boolean|string   $newPhrase     new Phrase to use or true to generate a new one

[ Top ]

getCAPTCHA   [line 138]

string|object getCAPTCHA( )

Place holder for the real getCAPTCHA() method used by extended classes to return the generated CAPTCHA (as an image resource, as an ASCII text, ...).
  • Access: public

[ Top ]

getPhrase   [line 148]

string getPhrase( )

Return secret CAPTCHA phrase.
  • Return: secret phrase
  • Access: public

[ Top ]

init   [line 124]

void init( [array $options = array()])

Reinitialize the entire Text_CAPTCHA object.
  • Access: public

Parameters:

array   $options     Options to pass in.

[ Top ]


Documentation generated on Fri, 28 Feb 2014 16:00:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.