Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
OMPCompletedPaymentDAO Class Reference
Inheritance diagram for OMPCompletedPaymentDAO:
DAO

Public Member Functions

_returnPaymentFromRow (&$row)
 
getCompletedPayment ($completedPaymentId, $pressId=null)
 
 getInsertId ()
 
getPaymentsByPressId ($pressId, $rangeInfo=null)
 
 hasPaidPurchaseFile ($userId, $fileIdAndRevision)
 
 insertCompletedPayment (&$completedPayment)
 
 newDataObject ()
 
- 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 ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 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

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and querying past payments.

See Also
OMPCompletedPayment, Payment

Definition at line 21 of file OMPCompletedPaymentDAO.inc.php.

Member Function Documentation

& OMPCompletedPaymentDAO::_returnPaymentFromRow ( $row)

Internal function to return a OMPCompletedPayment object from a row.

Parameters
$rowarray
Returns
CompletedPayment

Definition at line 133 of file OMPCompletedPaymentDAO.inc.php.

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

Referenced by getCompletedPayment().

& OMPCompletedPaymentDAO::getCompletedPayment (   $completedPaymentId,
  $pressId = null 
)

Retrieve a ComplatedPayment by its ID.

Parameters
$completedPaymentIdint
$pressIdint optional
Returns
OMPCompletedPayment

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

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

OMPCompletedPaymentDAO::getInsertId ( )

Get the ID of the last inserted completed payment.

Returns
int

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

References DAO\_getInsertId().

Referenced by insertCompletedPayment().

& OMPCompletedPaymentDAO::getPaymentsByPressId (   $pressId,
  $rangeInfo = null 
)

Retrieve an array of payments for a particular press ID.

Parameters
$pressIdint
Returns
object DAOResultFactory containing matching payments

Definition at line 109 of file OMPCompletedPaymentDAO.inc.php.

References DAO\retrieveRange().

OMPCompletedPaymentDAO::hasPaidPurchaseFile (   $userId,
  $fileIdAndRevision 
)

Look for a completed PURCHASE_PUBLICATION_FORMAT payment matching the article ID

Parameters
$userIdint
string$fileIdAndRevision

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

References DAO\retrieve().

OMPCompletedPaymentDAO::insertCompletedPayment ( $completedPayment)

Insert a new completed payment.

Parameters
$completedPaymentOMPCompletedPayment

Definition at line 51 of file OMPCompletedPaymentDAO.inc.php.

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

OMPCompletedPaymentDAO::newDataObject ( )

Return a new data object.

Returns
OMPCompletedPayment

Definition at line 124 of file OMPCompletedPaymentDAO.inc.php.

Referenced by _returnPaymentFromRow().


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