Jeff PHP framework
0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
|
Class used to generate captcha images. More...
Public Member Functions | |
__construct ($name, $opts=null) | |
Constructs a captcha instance. | |
check () | |
Cheks if the user inputs the right captcha code. | |
render ($opts=null) | |
Renders the captcha image and input. | |
Private Member Functions | |
generateStrings () | |
Generates a random alphanumeric string. | |
hex2RGB ($hexStr) | |
Converts a hex color string in a rgb array. | |
Private Attributes | |
$_allow_numbers | |
whether to allow number in captcha or not | |
$_font_file | |
absolute path of the font ttf file | |
$_height | |
captcha image height | |
$_letters | |
letters allowed for the captcha | |
$_name | |
name of the captcha field | |
$_numbers | |
numbers allowed for the captcha | |
$_width | |
captcha image width |
Class used to generate captcha images.
Definition at line 21 of file captcha.class.php.
captcha::__construct | ( | $ | name, |
$ | opts = null |
||
) |
Constructs a captcha instance.
string | $name | the name of the captcha field |
array | $opts | Associative array of options
|
Definition at line 67 of file captcha.class.php.
captcha::check | ( | ) |
Cheks if the user inputs the right captcha code.
Definition at line 205 of file captcha.class.php.
captcha::generateStrings | ( | ) | [private] |
Generates a random alphanumeric string.
Definition at line 147 of file captcha.class.php.
captcha::hex2RGB | ( | $ | hexStr | ) | [private] |
Converts a hex color string in a rgb array.
string | $hexStr | the hex string |
Definition at line 176 of file captcha.class.php.
captcha::render | ( | $ | opts = null | ) |
Renders the captcha image and input.
mixed | $opts | Associative array of options
|
Definition at line 91 of file captcha.class.php.
captcha::$_allow_numbers [private] |
whether to allow number in captcha or not
Definition at line 56 of file captcha.class.php.
captcha::$_font_file [private] |
absolute path of the font ttf file
Definition at line 41 of file captcha.class.php.
captcha::$_height [private] |
captcha image height
Definition at line 36 of file captcha.class.php.
captcha::$_letters [private] |
letters allowed for the captcha
Definition at line 46 of file captcha.class.php.
captcha::$_name [private] |
name of the captcha field
Definition at line 26 of file captcha.class.php.
captcha::$_numbers [private] |
numbers allowed for the captcha
Definition at line 51 of file captcha.class.php.
captcha::$_width [private] |
captcha image width
Definition at line 31 of file captcha.class.php.