| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | CiviCRM version 4.3 | |
| 6 | +--------------------------------------------------------------------+ |
| 7 | | Copyright CiviCRM LLC (c) 2004-2013 | |
| 8 | +--------------------------------------------------------------------+ |
| 9 | | This file is a part of CiviCRM. | |
| 10 | | | |
| 11 | | CiviCRM is free software; you can copy, modify, and distribute it | |
| 12 | | under the terms of the GNU Affero General Public License | |
| 13 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | |
| 14 | | | |
| 15 | | CiviCRM is distributed in the hope that it will be useful, but | |
| 16 | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 18 | | See the GNU Affero General Public License for more details. | |
| 19 | | | |
| 20 | | You should have received a copy of the GNU Affero General Public | |
| 21 | | License and the CiviCRM Licensing Exception along | |
| 22 | | with this program; if not, contact CiviCRM LLC | |
| 23 | | at info[AT]civicrm[DOT]org. If you have questions about the | |
| 24 | | GNU Affero General Public License or the licensing of CiviCRM, | |
| 25 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | |
| 26 | +--------------------------------------------------------------------+ |
| 27 | */ |
| 28 | |
| 29 | /** |
| 30 | * Class representing the table relationships |
| 31 | * |
| 32 | * @package CRM |
| 33 | * @copyright CiviCRM LLC (c) 2004-2013 |
| 34 | * $Id$ |
| 35 | * |
| 36 | */ |
| 37 | class CRM_Core_TableHierarchy { |
| 38 | |
| 39 | /** |
| 40 | * This array defines weights for table, which are used to sort array of table in from clause |
| 41 | * @var array |
| 42 | * @static |
| 43 | */ |
| 44 | static $info = array( |
| 45 | 'civicrm_contact' => '01', |
| 46 | 'civicrm_address' => '09', |
| 47 | 'civicrm_county' => '10', |
| 48 | 'civicrm_state_province' => '11', |
| 49 | 'civicrm_country' => '12', |
| 50 | 'civicrm_email' => '13', |
| 51 | 'civicrm_phone' => '14', |
| 52 | 'civicrm_im' => '15', |
| 53 | 'civicrm_openid' => '17', |
| 54 | 'civicrm_location_type' => '18', |
| 55 | 'civicrm_group_contact' => '19', |
| 56 | 'civicrm_group' => '20', |
| 57 | 'civicrm_subscription_history' => '21', |
| 58 | 'civicrm_entity_tag' => '22', |
| 59 | 'civicrm_note' => '23', |
| 60 | 'civicrm_contribution' => '24', |
| 61 | 'civicrm_financial_type' => '25', |
| 62 | 'civicrm_participant' => '26', |
| 63 | 'civicrm_event' => '27', |
| 64 | 'civicrm_worldregion' => '28', |
| 65 | 'civicrm_case_contact' => '29', |
| 66 | 'civicrm_case' => '30', |
| 67 | 'case_relationship' => '31', |
| 68 | 'case_relation_type' => '32', |
| 69 | 'civicrm_activity' => '33', |
| 70 | 'civicrm_mailing_summary' => '34', |
| 71 | 'civicrm_mailing_event_queue' => '35', |
| 72 | 'civicrm_mailing_job' => '36', |
| 73 | 'civicrm_mailing' => '37', |
| 74 | 'civicrm_mailing_event_bounce' => '38', |
| 75 | 'civicrm_mailing_event_opened' => '39', |
| 76 | 'civicrm_mailing_event_reply' => '40', |
| 77 | 'civicrm_mailing_event_trackable_url_open' => '41', |
| 78 | ); |
| 79 | |
| 80 | static function &info() { |
| 81 | //get the campaign related tables. |
| 82 | CRM_Campaign_BAO_Query::info(self::$info); |
| 83 | |
| 84 | return self::$info; |
| 85 | } |
| 86 | } |
| 87 | |