Merge pull request #3516 from jitendrapurohit/CRM-14869
[civicrm-core.git] / CRM / Utils / SoapServer.php
index 63a0fdbebc4997161afbb2f5eeaf34e6b00f8de5..7d2901405223477db4f12b31aa1440acd92a1146 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -37,7 +37,7 @@
  * This class handles all SOAP client requests.
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -58,7 +58,7 @@ class CRM_Utils_SoapServer {
    * Class constructor.  This caches the real user framework class locally,
    * so we can use it for authentication and validation.
    *
-   * @param  string $uf       The userframework class
+   * @internal param string $uf The userframework class
    */
   public function __construct() {
     // any external program which call SoapServer is responsible for
@@ -85,8 +85,9 @@ class CRM_Utils_SoapServer {
   /**
    * Verify a SOAP key
    *
-   * @param string $key   The soap key generated by authenticate()
+   * @param string $key The soap key generated by authenticate()
    *
+   * @throws SoapFault
    * @return void
    * @access public
    */
@@ -115,9 +116,12 @@ class CRM_Utils_SoapServer {
   /**
    * Authentication wrapper to the UF Class
    *
-   * @param string $name      Login name
-   * @param string $pass      Password
+   * @param string $name Login name
+   * @param string $pass Password
    *
+   * @param bool $loadCMSBootstrap
+   *
+   * @throws SoapFault
    * @return string           The SOAP Client key
    * @access public
    * @static
@@ -157,6 +161,15 @@ class CRM_Utils_SoapServer {
     return civicrm_api('Mailing', 'event_bounce', $params);
   }
 
+  /**
+   * @param $key
+   * @param $job
+   * @param $queue
+   * @param $hash
+   *
+   * @return array|int
+   * @throws SoapFault
+   */
   public function mailer_event_unsubscribe($key, $job, $queue, $hash) {
     $this->verify($key);
     $params = array(
@@ -170,6 +183,15 @@ class CRM_Utils_SoapServer {
     return civicrm_api('MailingGroup', 'event_unsubscribe', $params);
   }
 
+  /**
+   * @param $key
+   * @param $job
+   * @param $queue
+   * @param $hash
+   *
+   * @return array|int
+   * @throws SoapFault
+   */
   public function mailer_event_domain_unsubscribe($key, $job, $queue, $hash) {
     $this->verify($key);
     $params = array(
@@ -183,6 +205,15 @@ class CRM_Utils_SoapServer {
     return civicrm_api('MailingGroup', 'event_domain_unsubscribe', $params);
   }
 
+  /**
+   * @param $key
+   * @param $job
+   * @param $queue
+   * @param $hash
+   *
+   * @return array|int
+   * @throws SoapFault
+   */
   public function mailer_event_resubscribe($key, $job, $queue, $hash) {
     $this->verify($key);
     $params = array(
@@ -196,6 +227,15 @@ class CRM_Utils_SoapServer {
     return civicrm_api('MailingGroup', 'event_resubscribe', $params);
   }
 
+  /**
+   * @param $key
+   * @param $email
+   * @param $domain
+   * @param $group
+   *
+   * @return array|int
+   * @throws SoapFault
+   */
   public function mailer_event_subscribe($key, $email, $domain, $group) {
     $this->verify($key);
     $params = array(
@@ -206,6 +246,15 @@ class CRM_Utils_SoapServer {
     return civicrm_api('MailingGroup', 'event_subscribe', $params);
   }
 
+  /**
+   * @param $key
+   * @param $contact
+   * @param $subscribe
+   * @param $hash
+   *
+   * @return array|int
+   * @throws SoapFault
+   */
   public function mailer_event_confirm($key, $contact, $subscribe, $hash) {
     $this->verify($key);
     $params = array(
@@ -219,6 +268,19 @@ class CRM_Utils_SoapServer {
     return civicrm_api('Mailing', 'event_confirm', $params);
   }
 
+  /**
+   * @param $key
+   * @param $job
+   * @param $queue
+   * @param $hash
+   * @param $bodyTxt
+   * @param $rt
+   * @param null $bodyHTML
+   * @param null $fullEmail
+   *
+   * @return array|int
+   * @throws SoapFault
+   */
   public function mailer_event_reply($key, $job, $queue, $hash, $bodyTxt, $rt, $bodyHTML = NULL, $fullEmail = NULL) {
     $this->verify($key);
     $params = array(
@@ -235,6 +297,16 @@ class CRM_Utils_SoapServer {
     return civicrm_api('Mailing', 'event_reply', $params);
   }
 
+  /**
+   * @param $key
+   * @param $job
+   * @param $queue
+   * @param $hash
+   * @param $email
+   *
+   * @return array|int
+   * @throws SoapFault
+   */
   public function mailer_event_forward($key, $job, $queue, $hash, $email) {
     $this->verify($key);
     $params = array(
@@ -247,6 +319,13 @@ class CRM_Utils_SoapServer {
     return civicrm_api('Mailing', 'event_forward', $params);
   }
 
+  /**
+   * @param $key
+   * @param $params
+   *
+   * @return array|int
+   * @throws SoapFault
+   */
   public function get_contact($key, $params) {
     $this->verify($key);
     $params['version'] = 3;