ocs  2.3.6
About: OCS (Open Conference System) is a Web publishing tool that will create a complete Web presence for your scholarly conference.
  Fossies Dox: ocs-2.3.6.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

QueuedPaymentDAO.inc.php
Go to the documentation of this file.
1 <?php
2 
17 //$Id$
18 
19 class QueuedPaymentDAO extends DAO {
23  function QueuedPaymentDAO() {
24  parent::DAO();
25  }
26 
32  function &getQueuedPayment($queuedPaymentId) {
33  $result =& $this->retrieve(
34  'SELECT * FROM queued_payments WHERE queued_payment_id = ?',
35  $queuedPaymentId
36  );
37 
38  $queuedPayment = null;
39  if ($result->RecordCount() != 0) {
40  $queuedPayment = unserialize($result->fields['payment_data']);
41  if (!is_object($queuedPayment)) unset($queuedPayment);
42  }
43  $result->Close();
44  unset($result);
45  return $queuedPayment;
46  }
47 
53  function insertQueuedPayment(&$queuedPayment, $expiryDate = null) {
54  $this->update(
55  sprintf('INSERT INTO queued_payments
56  (date_created, date_modified, expiry_date, payment_data)
57  VALUES
58  (%s, %s, %s, ?)',
61  $this->datetimeToDB($expiryDate)),
62  array(
63  serialize($queuedPayment)
64  )
65  );
66 
67  return $this->getInsertQueuedPaymentId();
68  }
69 
75  function updateQueuedPayment($queuedPaymentId, &$queuedPayment) {
76  return $this->update(
77  sprintf('UPDATE queued_payments
78  SET
79  date_modified = %s,
80  payment_data = ?
81  WHERE queued_payment_id = ?',
83  array(
84  serialize($queuedPayment),
85  (int) $queuedPaymentId
86  )
87  );
88  }
89 
95  return $this->getInsertId('queued_payments', 'queued_payment_id');
96  }
97 
102  function deleteQueuedPayment($queuedPaymentId) {
103  return $this->update(
104  'DELETE FROM queued_payments WHERE queued_payment_id = ?',
105  array((int) $queuedPaymentId)
106  );
107  }
108 }
109 
110 ?>
config TEMPLATE inc php
Definition: config.inc.php:4
Operations for retrieving and modifying objects from a database.
Definition: DAO.inc.php:30
& retrieve($sql, $params=false, $callHooks=true)
Definition: DAO.inc.php:62
& getQueuedPayment($queuedPaymentId)
getInsertId($table='', $id='', $callHooks=true)
Definition: DAO.inc.php:225
getCurrentDate($ts=null)
Definition: Core.inc.php:90
deleteQueuedPayment($queuedPaymentId)
insertQueuedPayment(&$queuedPayment, $expiryDate=null)
updateQueuedPayment($queuedPaymentId, &$queuedPayment)
Operations for retrieving and modifying queued payment objects.
datetimeToDB($dt)
Definition: DAO.inc.php:258
update($sql, $params=false, $callHooks=true, $dieOnError=true)
Definition: DAO.inc.php:186