OXID eShop CE  4.9.6
 All Classes Files Functions Variables Pages
oxCaptcha Class Reference
+ Inheritance diagram for oxCaptcha:
+ Collaboration diagram for oxCaptcha:

Public Member Functions

 getText ()
 getHash ($sText=null)
 getTextHash ($sText)
 getImageUrl ()
 isImageVisible ()
 pass ($sMac, $sMacHash)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _passFromSession ($sMacHash, $sHash, $iTime)
 _passFromDb ($iMacHash, $sHash, $iTime)

Protected Attributes

 $_iMacLength = 5
 $_sText = null
 $_iTimeout = 300

Private Attributes

 $_sMacChars = 'abcdefghijkmnpqrstuvwxyz23456789'

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Class handling CAPTCHA image This class requires utility file utils/verificationimg.php as image generator

Definition at line 8 of file oxcaptcha.php.

Member Function Documentation

oxCaptcha::_passFromDb (   $iMacHash,
  $sHash,
  $iTime 
)
protected

Checks for DB captcha hash validity

Parameters
int$iMacHashhash key
string$sHashcaptcha hash
int$iTimecheck time
Returns
bool

Definition at line 162 of file oxcaptcha.php.

oxCaptcha::_passFromSession (   $sMacHash,
  $sHash,
  $iTime 
)
protected

Checks for session captcha hash validity

Parameters
string$sMacHashhash key
string$sHashcaptcha hash
int$iTimecheck time
Returns
bool

Definition at line 136 of file oxcaptcha.php.

oxCaptcha::getHash (   $sText = null)

Returns text hash

Parameters
string$sTextUser supplie text
Returns
string

Definition at line 63 of file oxcaptcha.php.

oxCaptcha::getImageUrl ( )

Returns url to CAPTCHA image generator.

Returns
string

Definition at line 109 of file oxcaptcha.php.

oxCaptcha::getText ( )

Returns text

Returns
string

Definition at line 44 of file oxcaptcha.php.

oxCaptcha::getTextHash (   $sText)

Returns given string captcha hash

Parameters
string$sTextstring to hash
Returns
string

Definition at line 93 of file oxcaptcha.php.

oxCaptcha::isImageVisible ( )

Checks if image could be generated

Returns
bool

Definition at line 122 of file oxcaptcha.php.

oxCaptcha::pass (   $sMac,
  $sMacHash 
)

Verifies captcha input vs supplied hash. Returns true on success.

Parameters
string$sMacUser supplied text
string$sMacHashGenerated hash
Returns
bool

Definition at line 189 of file oxcaptcha.php.

Member Data Documentation

oxCaptcha::$_iMacLength = 5
protected

Definition at line 16 of file oxcaptcha.php.

oxCaptcha::$_iTimeout = 300
protected

Definition at line 37 of file oxcaptcha.php.

oxCaptcha::$_sMacChars = 'abcdefghijkmnpqrstuvwxyz23456789'
private

Definition at line 30 of file oxcaptcha.php.

oxCaptcha::$_sText = null
protected

Definition at line 23 of file oxcaptcha.php.


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