Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
CaptchaDAO Class Reference
Inheritance diagram for CaptchaDAO:
DAO

Public Member Functions

_returnCaptchaFromRow ($row)
 
 CaptchaDAO ()
 
 deleteObject (&$captcha)
 
getCaptcha ($captchaId)
 
getCaptchasBySessionId ($sessionId)
 
getExpiredCaptchas ($lifespan=86400)
 
 getInsertCaptchaId ()
 
 insertCaptcha (&$captcha)
 
 newDataObject ()
 
 updateObject (&$captcha)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying Captcha keys.

See Also
Captcha

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

Member Function Documentation

& CaptchaDAO::_returnCaptchaFromRow (   $row)

Creates and returns a captcha object from a row

Parameters
$rowarray
Returns
Captcha object

Definition at line 115 of file CaptchaDAO.inc.php.

References HookRegistry\call(), DAO\datetimeFromDB(), and newDataObject().

Referenced by getCaptcha(), getCaptchasBySessionId(), and getExpiredCaptchas().

CaptchaDAO::CaptchaDAO ( )

Constructor

Definition at line 24 of file CaptchaDAO.inc.php.

CaptchaDAO::deleteObject ( $captcha)

removes a captcha from captchas table

Parameters
Captchaobject

Definition at line 162 of file CaptchaDAO.inc.php.

References DAO\update().

& CaptchaDAO::getCaptcha (   $captchaId)

Retrieve Captcha by captcha id

Parameters
$captchaIdint
Returns
Captcha object

Definition at line 85 of file CaptchaDAO.inc.php.

References _returnCaptchaFromRow(), and DAO\retrieve().

& CaptchaDAO::getCaptchasBySessionId (   $sessionId)

Retrieve captchas by session id

Parameters
$userIdint
Returns
Captcha objects array

Definition at line 33 of file CaptchaDAO.inc.php.

References _returnCaptchaFromRow(), and DAO\retrieve().

& CaptchaDAO::getExpiredCaptchas (   $lifespan = 86400)

Retrieve expired captchas

Parameters
$lifespanint optional number of seconds a captcha should last
Returns
Captcha objects array

Definition at line 57 of file CaptchaDAO.inc.php.

References _returnCaptchaFromRow(), DAO\datetimeToDB(), and DAO\retrieve().

CaptchaDAO::getInsertCaptchaId ( )

Get the ID of the last inserted captcha.

Returns
int

Definition at line 154 of file CaptchaDAO.inc.php.

References DAO\getInsertId().

Referenced by insertCaptcha().

CaptchaDAO::insertCaptcha ( $captcha)

inserts a new captcha into captchas table

Parameters
Captchaobject
Returns
int ID of new captcha

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

References DAO\datetimeToDB(), Core\getCurrentDate(), getInsertCaptchaId(), and DAO\update().

CaptchaDAO::newDataObject ( )

Instantiate and return a new data object.

Returns
Captcha

Definition at line 106 of file CaptchaDAO.inc.php.

Referenced by _returnCaptchaFromRow().

CaptchaDAO::updateObject ( $captcha)

updates a captcha

Parameters
Captchaobject

Definition at line 178 of file CaptchaDAO.inc.php.

References DAO\datetimeToDB(), and DAO\update().


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