1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* |
5
|
|
|
* Class EEM_Extra_Join |
6
|
|
|
* |
7
|
|
|
* Description here |
8
|
|
|
* |
9
|
|
|
* @package Event Espresso |
10
|
|
|
* @subpackage |
11
|
|
|
* @author Mike Nelson |
12
|
|
|
* @since $VID:$ |
13
|
|
|
* |
14
|
|
|
*/ |
15
|
|
|
if (!defined('EVENT_ESPRESSO_VERSION')) { |
16
|
|
|
exit('No direct script access allowed'); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
class EEM_Extra_Join extends EEM_Base{ |
20
|
|
|
// private instance of the Extra Join object |
21
|
|
|
protected static $_instance = NULL; |
22
|
|
|
|
23
|
|
|
public function __construct($timezone = NULL) { |
24
|
|
|
$models_this_can_join = array_keys( EE_Registry::instance()->non_abstract_db_models ); |
25
|
|
|
$this->_tables = array( |
|
|
|
|
26
|
|
|
'Extra_Join' => new EE_Primary_Table( 'esp_extra_join', 'EXJ_ID' ), |
27
|
|
|
); |
28
|
|
|
$this->_fields = array( |
|
|
|
|
29
|
|
|
'Extra_Join' => array( |
30
|
|
|
'EXJ_ID' => new EE_Primary_Key_Int_Field( 'EXJ_ID', __( 'Extra Join ID', 'event_espresso' ) ), |
31
|
|
|
'EXJ_first_model_ID' => new EE_Foreign_Key_String_Field( 'EXJ_first_model_ID', __( 'First Model ID', 'event_espresso' ), true, 0, $models_this_can_join ), |
|
|
|
|
32
|
|
|
'EXJ_first_model_name' => new EE_Any_Foreign_Model_Name_Field( 'EXJ_first_model_name', __( 'First Model Name', 'event_espresso'), true, '', $models_this_can_join ), |
|
|
|
|
33
|
|
|
'EXJ_second_model_ID' => new EE_Foreign_Key_String_Field( 'EXJ_second_model_ID', __( 'Second Model ID', 'event_espresso' ), true, 0, $models_this_can_join ), |
|
|
|
|
34
|
|
|
'EXJ_second_model_name' => new EE_Any_Foreign_Model_Name_Field( 'EXJ_second_model_name', __( 'Second Model Name', 'event_espresso'), true, '', $models_this_can_join ), |
|
|
|
|
35
|
|
|
|
36
|
|
|
) |
37
|
|
|
); |
38
|
|
|
foreach($models_this_can_join as $model){ |
39
|
|
|
$this->_model_relations[$model] = new EE_Belongs_To_Any_Relation(); |
40
|
|
|
} |
41
|
|
|
parent::__construct($timezone); |
42
|
|
|
} |
43
|
|
|
} |
44
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..