Merge pull request #9656 from eileenmcnaughton/comments
[civicrm-core.git] / CRM / Mailing / DAO / BouncePattern.php
index 127ebae86165c7b4979b0b54368dcdcbc93c8351..1de4ba609f1c89fc5ddb9e8d7a0802ac302a957f 100644 (file)
@@ -3,7 +3,7 @@
 +--------------------------------------------------------------------+
 | CiviCRM version 4.7                                                |
 +--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2016                                |
+| Copyright CiviCRM LLC (c) 2004-2017                                |
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
@@ -26,7 +26,7 @@
 */
 /**
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
  *
  * Generated from xml/schema/CRM/Mailing/BouncePattern.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
  */
 require_once 'CRM/Core/DAO.php';
 require_once 'CRM/Utils/Type.php';
+/**
+ * CRM_Mailing_DAO_BouncePattern constructor.
+ */
 class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO {
   /**
-   * static instance to hold the table name
+   * Static instance to hold the table name.
    *
    * @var string
    */
   static $_tableName = 'civicrm_mailing_bounce_pattern';
   /**
-   * static instance to hold the field values
-   *
-   * @var array
-   */
-  static $_fields = null;
-  /**
-   * static instance to hold the FK relationships
-   *
-   * @var string
-   */
-  static $_links = null;
-  /**
-   * static value to see if we should log any modifications to
-   * this table in the civicrm_log table
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
    *
    * @var boolean
    */
@@ -78,26 +68,25 @@ class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO {
    */
   public $pattern;
   /**
-   * class constructor
-   *
-   * @return civicrm_mailing_bounce_pattern
+   * Class constructor.
    */
   function __construct() {
     $this->__table = 'civicrm_mailing_bounce_pattern';
     parent::__construct();
   }
   /**
-   * Returns foreign keys and entity references
+   * Returns foreign keys and entity references.
    *
    * @return array
    *   [CRM_Core_Reference_Interface]
    */
   static function getReferenceColumns() {
-    if (!self::$_links) {
-      self::$_links = static ::createReferenceColumns(__CLASS__);
-      self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'bounce_type_id', 'civicrm_mailing_bounce_type', 'id');
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'bounce_type_id', 'civicrm_mailing_bounce_type', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
     }
-    return self::$_links;
+    return Civi::$statics[__CLASS__]['links'];
   }
   /**
    * Returns all the column names of this table
@@ -105,8 +94,8 @@ class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO {
    * @return array
    */
   static function &fields() {
-    if (!(self::$_fields)) {
-      self::$_fields = array(
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = array(
         'id' => array(
           'name' => 'id',
           'type' => CRM_Utils_Type::T_INT,
@@ -130,8 +119,9 @@ class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO {
           'size' => CRM_Utils_Type::HUGE,
         ) ,
       );
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
     }
-    return self::$_fields;
+    return Civi::$statics[__CLASS__]['fields'];
   }
   /**
    * Return a mapping from field-name to the corresponding key (as used in fields()).