Add missing comments in CRM/Core
[civicrm-core.git] / CRM / Core / Payment / PaymentExpress.php
index 28bbf69618ca0cb7b11e6160d412920df699b156..2efa379d4c5428b7350d1ff5d888ca70efd2eaa5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
   +--------------------------------------------------------------------+
-  | CiviCRM version 4.4                                                |
+  | CiviCRM version 4.5                                                |
   +--------------------------------------------------------------------+
   | This file is a part of CiviCRM.                                    |
   |                                                                    |
@@ -51,7 +51,9 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
    *
    * @param string $mode the mode of operation: live or test
    *
-   * @return void
+   * @param $paymentProcessor
+   *
+   * @return \CRM_Core_Payment_PaymentExpress
    */
   function __construct($mode, &$paymentProcessor) {
 
@@ -65,9 +67,12 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
    *
    * @param string $mode the mode of operation: live or test
    *
+   * @param object $paymentProcessor
+   * @param null $paymentForm
+   * @param bool $force
+   *
    * @return object
    * @static
-   *
    */
   static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
     $processorName = $paymentProcessor['name'];
@@ -77,6 +82,14 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
     return self::$_singleton[$processorName];
   }
 
+  /**
+   * This function checks to see if we have the right config values
+   *
+   * @internal param string $mode the mode we are operating in (live or test)
+   *
+   * @return string the error message if any
+   * @public
+   */
   function checkConfig() {
     $config = CRM_Core_Config::singleton();
 
@@ -110,6 +123,15 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
 
+  /**
+   * This function collects all the information from a web/api form and invokes
+   * the relevant payment processor specific functions to perform the transaction
+   *
+   * @param  array $params assoc array of input parameters for this transaction
+   *
+   * @return array the result in an nice formatted array (or an error object)
+   * @abstract
+   */
   function doDirectPayment(&$params) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
@@ -117,11 +139,12 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
   /**
    * Main transaction function
    *
-   * @param array $params  name value pair of contribution data
+   * @param array $params name value pair of contribution data
+   *
+   * @param $component
    *
    * @return void
    * @access public
-   *
    */
   function doTransferCheckout(&$params, $component) {
     $component = strtolower($component);