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

Public Member Functions

 _redeemGiftSubscription (&$gift)
 
 GiftDAO ()
 
 newDataObject ()
 
 redeemGift ($assocType, $assocId, $userId, $giftId)
 
- Public Member Functions inherited from PKPGiftDAO
_returnGiftFromRow (&$row)
 
 deleteGiftById ($giftId)
 
 deleteGiftsByAssocId ($assocType, $assocId)
 
 deleteObject ($gift)
 
getAllGiftsByRecipient ($assocType, $userId, $rangeInfo=null)
 
getGift ($giftId)
 
 getGiftAssocId ($giftId)
 
 getGiftAssocType ($giftId)
 
getGiftsByAssocId ($assocType, $assocId, $rangeInfo=null)
 
getGiftsByRecipient ($assocType, $assocId, $userId, $rangeInfo=null)
 
getGiftsByTypeAndRecipient ($assocType, $assocId, $giftType, $userId, $rangeInfo=null)
 
 getInsertGiftId ()
 
getNotRedeemedGiftsByRecipient ($assocType, $assocId, $userId, $rangeInfo=null)
 
getNotRedeemedGiftsByTypeAndRecipient ($assocType, $assocId, $giftType, $userId, $rangeInfo=null)
 
 insertObject (&$gift)
 
 PKPGiftDAO ()
 
 recipientHasGift ($assocType, $assocId, $userId, $giftId)
 
 recipientHasNotRedeemedGift ($assocType, $assocId, $userId, $giftId)
 
 redeemGift ($assocType, $assocId, $userId, $giftId)
 
 updateObject (&$gift)
 
- 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

OJS extension of PKPGiftDAO.

See Also
PKPGiftDAO

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

Member Function Documentation

GiftDAO::_redeemGiftSubscription ( $gift)

Redeem a gift subscription for a user.

Parameters
$giftGift
Returns
int Status code indicating whether gift subscription could be redeemed

Definition at line 86 of file GiftDAO.inc.php.

References DAORegistry\getDAO().

Referenced by redeemGift().

GiftDAO::GiftDAO ( )

Constructor

Definition at line 28 of file GiftDAO.inc.php.

GiftDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
Gift

Definition at line 36 of file GiftDAO.inc.php.

GiftDAO::redeemGift (   $assocType,
  $assocId,
  $userId,
  $giftId 
)

Redeem a gift for a user.

Parameters
$assocTypeint
$assocIdint
$userIdint
$giftIdint
Returns
int Status code indicating whether gift could be redeemed

Definition at line 48 of file GiftDAO.inc.php.

References _redeemGiftSubscription(), Core\getCurrentDate(), PKPGiftDAO\getGift(), PKPGiftDAO\recipientHasGift(), PKPGiftDAO\recipientHasNotRedeemedGift(), and PKPGiftDAO\updateObject().


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