Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
CaptchaManager Class Reference

Public Member Functions

 _performPeriodicCleanup ()
 
 CaptchaManager ()
 
createCaptcha ($length=6)
 
 generateImage (&$captcha)
 
 getHeight ()
 
 getMimeType ()
 
 getWidth ()
 
 isEnabled ()
 

Detailed Description

Class providing captcha services.

See Also
CaptchaDAO, Captcha

Definition at line 20 of file CaptchaManager.inc.php.

Member Function Documentation

CaptchaManager::_performPeriodicCleanup ( )

Private function: Perform periodic cleanup on the CAPTCHA table.

Definition at line 132 of file CaptchaManager.inc.php.

References DAORegistry\getDAO().

Referenced by CaptchaManager().

CaptchaManager::CaptchaManager ( )

Constructor. Create a manager for handling temporary file uploads.

Definition at line 25 of file CaptchaManager.inc.php.

References _performPeriodicCleanup().

& CaptchaManager::createCaptcha (   $length = 6)

Create a CAPTCHA object.

Parameters
$lengthint The length, in characters, of the CAPTCHA test to create
Returns
object Captcha

Definition at line 34 of file CaptchaManager.inc.php.

References Validation\generatePassword(), DAORegistry\getDAO(), PKPRequest\getSession(), and isEnabled().

CaptchaManager::generateImage ( $captcha)

Generate and display the CAPTCHA image.

Parameters
$captchaobject Captcha

Definition at line 76 of file CaptchaManager.inc.php.

References getHeight(), getMimeType(), Config\getVar(), getWidth(), String\strlen(), and String\substr().

CaptchaManager::getHeight ( )

Get the height, in pixels, of the CAPTCHA test to create

Returns
int Height

Definition at line 60 of file CaptchaManager.inc.php.

Referenced by generateImage().

CaptchaManager::getMimeType ( )

Get the MIME type of the CAPTCHA image that will be generated

Returns
string

Definition at line 68 of file CaptchaManager.inc.php.

Referenced by generateImage().

CaptchaManager::getWidth ( )

Get the width, in pixels, of the CAPTCHA test to create

Returns
int Width

Definition at line 52 of file CaptchaManager.inc.php.

Referenced by generateImage().

CaptchaManager::isEnabled ( )

Determine whether or not CAPTCHA testing is enabled and supported.

Returns
boolean

Definition at line 122 of file CaptchaManager.inc.php.

References Config\getVar().

Referenced by createCaptcha().


The documentation for this class was generated from the following file: