Merge pull request #14662 from eileenmcnaughton/activity_pdf_71
[civicrm-core.git] / CRM / Utils / SoapServer.php
index 43e73183ef0fdfa13419b27fe11928f2ac692418..46c24b98b65f81af0e84647682bcdefc5cd96546 100644 (file)
@@ -1,27 +1,11 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 5                                                  |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM is free software; you can copy, modify, and distribute it  |
- | under the terms of the GNU Affero General Public License           |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
- |                                                                    |
- | CiviCRM is distributed in the hope that it will be useful, but     |
- | WITHOUT ANY WARRANTY; without even the implied warranty of         |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
- | See the GNU Affero General Public License for more details.        |
+ | Copyright CiviCRM LLC. All rights reserved.                        |
  |                                                                    |
- | You should have received a copy of the GNU Affero General Public   |
- | License and the CiviCRM Licensing Exception along                  |
- | with this program; if not, contact CiviCRM LLC                     |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ | This work is published under the GNU AGPLv3 license with some      |
+ | permitted exceptions and without any warranty. For full license    |
+ | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
  */
 
  * This class handles all SOAP client requests.
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
 class CRM_Utils_SoapServer {
 
   /**
    * Number of seconds we should let a soap process idle
+   * @var int
    */
-  static $soap_timeout = 0;
+  public static $soap_timeout = 0;
 
   /**
    * Cache the actual UF Class
+   * @var string
    */
   public $ufClass;
 
@@ -149,14 +135,14 @@ class CRM_Utils_SoapServer {
    */
   public function mailer_event_bounce($key, $job, $queue, $hash, $body) {
     $this->verify($key);
-    $params = array(
+    $params = [
       'job_id' => $job,
       'time_stamp' => date('YmdHis'),
       'event_queue_id' => $queue,
       'hash' => $hash,
       'body' => $body,
       'version' => 3,
-    );
+    ];
     $result = civicrm_api('Mailing', 'event_bounce', $params);
     return CRM_Utils_Array::encode_items($result);
   }
@@ -174,14 +160,14 @@ class CRM_Utils_SoapServer {
    */
   public function mailer_event_unsubscribe($key, $job, $queue, $hash) {
     $this->verify($key);
-    $params = array(
+    $params = [
       'job_id' => $job,
       'time_stamp' => date('YmdHis'),
       'org_unsubscribe' => 0,
       'event_queue_id' => $queue,
       'hash' => $hash,
       'version' => 3,
-    );
+    ];
     $result = civicrm_api('MailingGroup', 'event_unsubscribe', $params);
     return CRM_Utils_Array::encode_items($result);
   }
@@ -197,14 +183,14 @@ class CRM_Utils_SoapServer {
    */
   public function mailer_event_domain_unsubscribe($key, $job, $queue, $hash) {
     $this->verify($key);
-    $params = array(
+    $params = [
       'job_id' => $job,
       'time_stamp' => date('YmdHis'),
       'org_unsubscribe' => 1,
       'event_queue_id' => $queue,
       'hash' => $hash,
       'version' => 3,
-    );
+    ];
     $result = civicrm_api('MailingGroup', 'event_domain_unsubscribe', $params);
     return CRM_Utils_Array::encode_items($result);
   }
@@ -220,14 +206,14 @@ class CRM_Utils_SoapServer {
    */
   public function mailer_event_resubscribe($key, $job, $queue, $hash) {
     $this->verify($key);
-    $params = array(
+    $params = [
       'job_id' => $job,
       'time_stamp' => date('YmdHis'),
       'org_unsubscribe' => 0,
       'event_queue_id' => $queue,
       'hash' => $hash,
       'version' => 3,
-    );
+    ];
     $result = civicrm_api('MailingGroup', 'event_resubscribe', $params);
     return CRM_Utils_Array::encode_items($result);
   }
@@ -243,11 +229,11 @@ class CRM_Utils_SoapServer {
    */
   public function mailer_event_subscribe($key, $email, $domain, $group) {
     $this->verify($key);
-    $params = array(
+    $params = [
       'email' => $email,
       'group_id' => $group,
       'version' => 3,
-    );
+    ];
     $result = civicrm_api('MailingGroup', 'event_subscribe', $params);
     return CRM_Utils_Array::encode_items($result);
   }
@@ -263,14 +249,14 @@ class CRM_Utils_SoapServer {
    */
   public function mailer_event_confirm($key, $contact, $subscribe, $hash) {
     $this->verify($key);
-    $params = array(
+    $params = [
       'contact_id' => $contact,
       'subscribe_id' => $subscribe,
       'time_stamp' => date('YmdHis'),
       'event_subscribe_id' => $subscribe,
       'hash' => $hash,
       'version' => 3,
-    );
+    ];
     $result = civicrm_api('Mailing', 'event_confirm', $params);
     return CRM_Utils_Array::encode_items($result);
   }
@@ -290,7 +276,7 @@ class CRM_Utils_SoapServer {
    */
   public function mailer_event_reply($key, $job, $queue, $hash, $bodyTxt, $rt, $bodyHTML = NULL, $fullEmail = NULL) {
     $this->verify($key);
-    $params = array(
+    $params = [
       'job_id' => $job,
       'event_queue_id' => $queue,
       'hash' => $hash,
@@ -300,7 +286,7 @@ class CRM_Utils_SoapServer {
       'fullEmail' => $fullEmail,
       'time_stamp' => date('YmdHis'),
       'version' => 3,
-    );
+    ];
     $result = civicrm_api('Mailing', 'event_reply', $params);
     return CRM_Utils_Array::encode_items($result);
   }
@@ -317,13 +303,13 @@ class CRM_Utils_SoapServer {
    */
   public function mailer_event_forward($key, $job, $queue, $hash, $email) {
     $this->verify($key);
-    $params = array(
+    $params = [
       'job_id' => $job,
       'event_queue_id' => $queue,
       'hash' => $hash,
       'email' => $email,
       'version' => 3,
-    );
+    ];
     $result = civicrm_api('Mailing', 'event_forward', $params);
     return CRM_Utils_Array::encode_items($result);
   }