Comments: on this page. Click to read or post your own.

Class MathSpamProtection

Description

Tools for adding an optional Maths protection question to a form.

Located in /cms/code/sitefeatures/MathSpamProtection.php (line 9)


	
			
Method Summary
static void correctAnswer ( $answer)
static void digitToWord ( $num)
static String getMathQuestion ()
static void isEnabled ()
static void setEnabled ([ $math = true])
Methods
static method correctAnswer (line 34)

Checks the given answer if it matches the addition of the saved session variables. Users can answer using words or digits.

static void correctAnswer ( $answer)
  • $answer
static method digitToWord (line 51)

Helper method for converting digits to their equivelant english words

static void digitToWord ( $num)
  • $num
static method getMathQuestion (line 17)

Creates the question from random variables, which are also saved to the session.

static String getMathQuestion ()
static method isEnabled (line 62)
static void isEnabled ()
static method setEnabled (line 66)
static void setEnabled ([ $math = true])
  • $math
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:42:51 +1300 by phpDocumentor 1.3.2