OXID eShop CE  4.10.7
 All Classes Namespaces 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

Deprecated:
since 5.3.0 (2016.04.07); It will be moved to captcha_module module.

Definition at line 9 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 165 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 139 of file oxcaptcha.php.

oxCaptcha::getHash (   $sText = null)

Returns text hash

Parameters
string$sTextUser supplie text
Returns
string

Definition at line 64 of file oxcaptcha.php.

oxCaptcha::getImageUrl ( )

Returns url to CAPTCHA image generator.

Returns
string

Definition at line 110 of file oxcaptcha.php.

oxCaptcha::getText ( )

Returns text

Returns
string

Definition at line 45 of file oxcaptcha.php.

oxCaptcha::getTextHash (   $sText)

Returns given string captcha hash

Parameters
string$sTextstring to hash
Returns
string

Definition at line 94 of file oxcaptcha.php.

oxCaptcha::isImageVisible ( )

Checks if image could be generated

Returns
bool

Definition at line 125 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 192 of file oxcaptcha.php.

Member Data Documentation

oxCaptcha::$_iMacLength = 5
protected

Definition at line 17 of file oxcaptcha.php.

oxCaptcha::$_iTimeout = 300
protected

Definition at line 38 of file oxcaptcha.php.

oxCaptcha::$_sMacChars = 'abcdefghijkmnpqrstuvwxyz23456789'
private

Definition at line 31 of file oxcaptcha.php.

oxCaptcha::$_sText = null
protected

Definition at line 24 of file oxcaptcha.php.


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