Completed
Branch Gutenberg/master (581eb6)
by
unknown
56:36 queued 47:29
created
event_single_caff/templates/admin-event-single-settings.template.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
3 3
 $values = EEH_Form_Fields::prep_answer_options(
4
-    array(
5
-        array('id' => 1, 'text' => __('Yes', 'event_espresso')),
6
-        array('id' => 0, 'text' => __('No', 'event_espresso')),
7
-    )
4
+	array(
5
+		array('id' => 1, 'text' => __('Yes', 'event_espresso')),
6
+		array('id' => 0, 'text' => __('No', 'event_espresso')),
7
+	)
8 8
 );
9 9
 ?>
10 10
 
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
 <h2 class="ee-admin-settings-hdr">
14 14
     <?php _e(
15
-        'Single Event Pages',
16
-        'event_espresso'
17
-    ); ?><?php // echo EEH_Template::get_help_tab_link('event_single_settings_info');?>
15
+		'Single Event Pages',
16
+		'event_espresso'
17
+	); ?><?php // echo EEH_Template::get_help_tab_link('event_single_settings_info');?>
18 18
 </h2>
19 19
 <table class="form-table">
20 20
     <tbody>
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
         </th>
27 27
         <td>
28 28
             <?php echo EEH_Form_Fields::select(
29
-                'display_status_banner_single',
30
-                $display_status_banner_single,
31
-                $values,
32
-                'display_status_banner_single',
33
-                'display_status_banner_single'
34
-            ); ?>
29
+				'display_status_banner_single',
30
+				$display_status_banner_single,
31
+				$values,
32
+				'display_status_banner_single',
33
+				'display_status_banner_single'
34
+			); ?>
35 35
             <p class="description"><?php
36
-                _e(
37
-                    'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.',
38
-                    'event_espresso'
39
-                ); ?></p>
36
+				_e(
37
+					'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.',
38
+					'event_espresso'
39
+				); ?></p>
40 40
         </td>
41 41
     </tr>
42 42
 
@@ -44,23 +44,23 @@  discard block
 block discarded – undo
44 44
         <th>
45 45
             <label for="display_venue">
46 46
                 <?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
47
-                    'display_addresses_in_reg_form_info'
48
-                ); ?>
47
+					'display_addresses_in_reg_form_info'
48
+				); ?>
49 49
             </label>
50 50
         </th>
51 51
         <td>
52 52
             <?php echo EEH_Form_Fields::select(
53
-                'display_venue',
54
-                $display_venue,
55
-                $values,
56
-                'display_venue',
57
-                'display_venue'
58
-            ); ?>
53
+				'display_venue',
54
+				$display_venue,
55
+				$values,
56
+				'display_venue',
57
+				'display_venue'
58
+			); ?>
59 59
             <p class="description"><?php
60
-                _e(
61
-                    'Do not use this if you are using the venue shortcodes in your event description.',
62
-                    'event_espresso'
63
-                ); ?></p>
60
+				_e(
61
+					'Do not use this if you are using the venue shortcodes in your event description.',
62
+					'event_espresso'
63
+				); ?></p>
64 64
         </td>
65 65
     </tr>
66 66
 
@@ -72,37 +72,37 @@  discard block
 block discarded – undo
72 72
         </th>
73 73
         <td>
74 74
             <?php
75
-            echo EEH_Form_Fields::select(
76
-                'use_sortable_display_order',
77
-                $use_sortable_display_order,
78
-                $values,
79
-                'EED_Events_Single_use_sortable_display_order',
80
-                'EED_Events_Single_use_sortable_display_order'
81
-            );
82
-            ?>
75
+			echo EEH_Form_Fields::select(
76
+				'use_sortable_display_order',
77
+				$use_sortable_display_order,
78
+				$values,
79
+				'EED_Events_Single_use_sortable_display_order',
80
+				'EED_Events_Single_use_sortable_display_order'
81
+			);
82
+			?>
83 83
         </td>
84 84
     </tr>
85 85
 
86 86
     <tr>
87 87
         <th>
88 88
             <?php _e('Display Order', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
89
-                'display_addresses_in_reg_form_info'
90
-            ); ?>
89
+				'display_addresses_in_reg_form_info'
90
+			); ?>
91 91
         </th>
92 92
         <td>
93 93
 
94 94
             <?php wp_nonce_field(
95
-                'espresso_update_event_single_order',
96
-                'espresso_update_event_single_order_nonce',
97
-                false
98
-            ); ?>
95
+				'espresso_update_event_single_order',
96
+				'espresso_update_event_single_order_nonce',
97
+				false
98
+			); ?>
99 99
             <?php echo $event_single_display_order; ?>
100 100
 
101 101
             <p class="description"><?php
102
-                _e(
103
-                    'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the single event page.',
104
-                    'event_espresso'
105
-                ); ?></p>
102
+				_e(
103
+					'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the single event page.',
104
+					'event_espresso'
105
+				); ?></p>
106 106
 
107 107
         </td>
108 108
     </tr>
Please login to merge, or discard this patch.
events_archive_caff/templates/admin-event-list-settings.template.php 1 patch
Indentation   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@  discard block
 block discarded – undo
2 2
 add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
3 3
 
4 4
 $values = EEH_Form_Fields::prep_answer_options(
5
-    array(
6
-        array('id' => 1, 'text' => __('Yes', 'event_espresso')),
7
-        array('id' => 0, 'text' => __('No', 'event_espresso')),
8
-    )
5
+	array(
6
+		array('id' => 1, 'text' => __('Yes', 'event_espresso')),
7
+		array('id' => 0, 'text' => __('No', 'event_espresso')),
8
+	)
9 9
 );
10 10
 
11 11
 $description = EEH_Form_Fields::prep_answer_options(
12
-    array(
13
-        array('id' => 0, 'text' => __('none', 'event_espresso')),
14
-        array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
15
-        array('id' => 2, 'text' => __('full description', 'event_espresso')),
16
-    )
12
+	array(
13
+		array('id' => 0, 'text' => __('none', 'event_espresso')),
14
+		array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
15
+		array('id' => 2, 'text' => __('full description', 'event_espresso')),
16
+	)
17 17
 );
18 18
 
19 19
 ?>
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
         <th>
33 33
             <label for="event_listings_url">
34 34
                 <?php _e('Event Listings URL', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
35
-                    'event_listings_url_info'
36
-                ); ?>
35
+					'event_listings_url_info'
36
+				); ?>
37 37
             </label>
38 38
         </th>
39 39
         <td>
40 40
             <a id="event_listings_url" class="ee-admin-settings-hdr-lnk small-text"
41 41
                href="<?php echo EEH_Event_View::event_archive_url(); ?>"><?php
42
-                echo EEH_Event_View::event_archive_url(); ?></a>
42
+				echo EEH_Event_View::event_archive_url(); ?></a>
43 43
         </td>
44 44
     </tr>
45 45
 
@@ -51,30 +51,30 @@  discard block
 block discarded – undo
51 51
         </th>
52 52
         <td>
53 53
             <p><?php echo site_url() . '/ '
54
-                          . EEH_Form_Fields::text(
55
-                              'not_used',
56
-                              EE_Registry::instance()->CFG->core->event_cpt_slug,
57
-                              'event_cpt_slug',
58
-                              'event_cpt_slug',
59
-                              'regular'
60
-                          ); ?></p>
54
+						  . EEH_Form_Fields::text(
55
+							  'not_used',
56
+							  EE_Registry::instance()->CFG->core->event_cpt_slug,
57
+							  'event_cpt_slug',
58
+							  'event_cpt_slug',
59
+							  'regular'
60
+						  ); ?></p>
61 61
             <p class="description"><?php
62
-                _e(
63
-                    'This allows you to configure what slug is used for the url of all event pages.',
64
-                    'event_espresso'
65
-                ); ?></p>
62
+				_e(
63
+					'This allows you to configure what slug is used for the url of all event pages.',
64
+					'event_espresso'
65
+				); ?></p>
66 66
             <?php if (has_filter('FHEE__EE_Register_CPTs__register_CPT__rewrite')) : ?>
67 67
                 <p class="important-notice">
68 68
                     <?php
69
-                    sprintf(
70
-                        __(
71
-                            'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.',
72
-                            'event_espresso'
73
-                        ),
74
-                        '<code>',
75
-                        '</code>'
76
-                    );
77
-                    ?>
69
+					sprintf(
70
+						__(
71
+							'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.',
72
+							'event_espresso'
73
+						),
74
+						'<code>',
75
+						'</code>'
76
+					);
77
+					?>
78 78
                 </p>
79 79
             <?php endif; ?>
80 80
         </td>
@@ -88,17 +88,17 @@  discard block
 block discarded – undo
88 88
         </th>
89 89
         <td>
90 90
             <?php echo EEH_Form_Fields::select(
91
-                'display_status_banner',
92
-                $display_status_banner,
93
-                $values,
94
-                'EED_Events_Archive_display_status_banner',
95
-                'EED_Events_Archive_display_status_banner'
96
-            ); ?>
91
+				'display_status_banner',
92
+				$display_status_banner,
93
+				$values,
94
+				'EED_Events_Archive_display_status_banner',
95
+				'EED_Events_Archive_display_status_banner'
96
+			); ?>
97 97
             <p class="description"><?php
98
-                _e(
99
-                    'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.',
100
-                    'event_espresso'
101
-                ); ?></p>
98
+				_e(
99
+					'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.',
100
+					'event_espresso'
101
+				); ?></p>
102 102
         </td>
103 103
     </tr>
104 104
 
@@ -106,18 +106,18 @@  discard block
 block discarded – undo
106 106
         <th>
107 107
             <label for="EED_Events_Archive_display_description">
108 108
                 <?php _e('Display Description', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
109
-                    'display_description_info'
110
-                ); ?>
109
+					'display_description_info'
110
+				); ?>
111 111
             </label>
112 112
         </th>
113 113
         <td>
114 114
             <?php echo EEH_Form_Fields::select(
115
-                'description',
116
-                $display_description,
117
-                $description,
118
-                'EED_Events_Archive_display_description',
119
-                'EED_Events_Archive_display_description'
120
-            ); ?>
115
+				'description',
116
+				$display_description,
117
+				$description,
118
+				'EED_Events_Archive_display_description',
119
+				'EED_Events_Archive_display_description'
120
+			); ?>
121 121
         </td>
122 122
     </tr>
123 123
 
@@ -125,18 +125,18 @@  discard block
 block discarded – undo
125 125
         <th>
126 126
             <label for="EED_Events_Archive_display_ticket_selector">
127 127
                 <?php _e('Display Ticket Selector', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
128
-                    'display_ticket_selector_info'
129
-                ); ?>
128
+					'display_ticket_selector_info'
129
+				); ?>
130 130
             </label>
131 131
         </th>
132 132
         <td>
133 133
             <?php echo EEH_Form_Fields::select(
134
-                'ticket_selector',
135
-                $display_ticket_selector,
136
-                $values,
137
-                'EED_Events_Archive_display_ticket_selector',
138
-                'EED_Events_Archive_display_ticket_selector'
139
-            ); ?>
134
+				'ticket_selector',
135
+				$display_ticket_selector,
136
+				$values,
137
+				'EED_Events_Archive_display_ticket_selector',
138
+				'EED_Events_Archive_display_ticket_selector'
139
+			); ?>
140 140
         </td>
141 141
     </tr>
142 142
 
@@ -144,18 +144,18 @@  discard block
 block discarded – undo
144 144
         <th>
145 145
             <label for="EED_Events_Archive_display_datetimes">
146 146
                 <?php _e('Display Datetimes', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
147
-                    'display_datetimes_info'
148
-                ); ?>
147
+					'display_datetimes_info'
148
+				); ?>
149 149
             </label>
150 150
         </th>
151 151
         <td>
152 152
             <?php echo EEH_Form_Fields::select(
153
-                'venue_details',
154
-                $display_datetimes,
155
-                $values,
156
-                'EED_Events_Archive_display_datetimes',
157
-                'EED_Events_Archive_display_datetimes'
158
-            ); ?>
153
+				'venue_details',
154
+				$display_datetimes,
155
+				$values,
156
+				'EED_Events_Archive_display_datetimes',
157
+				'EED_Events_Archive_display_datetimes'
158
+			); ?>
159 159
         </td>
160 160
     </tr>
161 161
 
@@ -163,18 +163,18 @@  discard block
 block discarded – undo
163 163
         <th>
164 164
             <label for="EED_Events_Archive_display_venue">
165 165
                 <?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
166
-                    'display_venue_details_info'
167
-                ); ?>
166
+					'display_venue_details_info'
167
+				); ?>
168 168
             </label>
169 169
         </th>
170 170
         <td>
171 171
             <?php echo EEH_Form_Fields::select(
172
-                'display_venue',
173
-                $display_venue,
174
-                $values,
175
-                'EED_Events_Archive_display_venue',
176
-                'EED_Events_Archive_display_venue'
177
-            ); ?>
172
+				'display_venue',
173
+				$display_venue,
174
+				$values,
175
+				'EED_Events_Archive_display_venue',
176
+				'EED_Events_Archive_display_venue'
177
+			); ?>
178 178
         </td>
179 179
     </tr>
180 180
 
@@ -182,18 +182,18 @@  discard block
 block discarded – undo
182 182
         <th>
183 183
             <label for="EED_Events_Archive_display_expired_events">
184 184
                 <?php _e('Display Expired Events', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
185
-                    'display_expired_events_info'
186
-                ); ?>
185
+					'display_expired_events_info'
186
+				); ?>
187 187
             </label>
188 188
         </th>
189 189
         <td>
190 190
             <?php echo EEH_Form_Fields::select(
191
-                'expired_events',
192
-                $display_expired_events,
193
-                $values,
194
-                'EED_Events_Archive_display_expired_events',
195
-                'EED_Events_Archive_display_expired_events'
196
-            ); ?>
191
+				'expired_events',
192
+				$display_expired_events,
193
+				$values,
194
+				'EED_Events_Archive_display_expired_events',
195
+				'EED_Events_Archive_display_expired_events'
196
+			); ?>
197 197
         </td>
198 198
     </tr>
199 199
 
@@ -201,43 +201,43 @@  discard block
 block discarded – undo
201 201
         <th>
202 202
             <label for="EED_Events_Archive_use_sortable_display_order">
203 203
                 <?php _e(
204
-                    'Use Custom Display Order?',
205
-                    'event_espresso'
206
-                ); ?><?php // echo EEH_Template::get_help_tab_link('use_sortable_display_order_info');?>
204
+					'Use Custom Display Order?',
205
+					'event_espresso'
206
+				); ?><?php // echo EEH_Template::get_help_tab_link('use_sortable_display_order_info');?>
207 207
             </label>
208 208
         </th>
209 209
         <td>
210 210
             <?php echo EEH_Form_Fields::select(
211
-                'use_sortable_display_order',
212
-                $use_sortable_display_order,
213
-                $values,
214
-                'EED_Events_Archive_use_sortable_display_order',
215
-                'EED_Events_Archive_use_sortable_display_order'
216
-            ); ?>
211
+				'use_sortable_display_order',
212
+				$use_sortable_display_order,
213
+				$values,
214
+				'EED_Events_Archive_use_sortable_display_order',
215
+				'EED_Events_Archive_use_sortable_display_order'
216
+			); ?>
217 217
         </td>
218 218
     </tr>
219 219
 
220 220
     <tr>
221 221
         <th>
222 222
             <?php _e(
223
-                'Display Order',
224
-                'event_espresso'
225
-            ); ?><?php // echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
223
+				'Display Order',
224
+				'event_espresso'
225
+			); ?><?php // echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
226 226
         </th>
227 227
         <td>
228 228
 
229 229
             <?php wp_nonce_field(
230
-                'espresso_update_event_archive_order',
231
-                'espresso_update_event_archive_order_nonce',
232
-                false
233
-            ); ?>
230
+				'espresso_update_event_archive_order',
231
+				'espresso_update_event_archive_order_nonce',
232
+				false
233
+			); ?>
234 234
             <?php echo $event_archive_display_order; ?>
235 235
 
236 236
             <p class="description"><?php
237
-                _e(
238
-                    'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.',
239
-                    'event_espresso'
240
-                ); ?></p>
237
+				_e(
238
+					'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.',
239
+					'event_espresso'
240
+				); ?></p>
241 241
 
242 242
         </td>
243 243
     </tr>
@@ -250,12 +250,12 @@  discard block
 block discarded – undo
250 250
         </th>
251 251
         <td>
252 252
             <?php echo EEH_Form_Fields::select(
253
-                'reset_event_list_settings',
254
-                0,
255
-                $values,
256
-                'EED_Events_Archive_reset_event_list_settings',
257
-                'EED_Events_Archive_reset_event_list_settings'
258
-            ); ?>
253
+				'reset_event_list_settings',
254
+				0,
255
+				$values,
256
+				'EED_Events_Archive_reset_event_list_settings',
257
+				'EED_Events_Archive_reset_event_list_settings'
258
+			); ?>
259 259
         </td>
260 260
     </tr>
261 261
 
Please login to merge, or discard this patch.
espresso.php 1 patch
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -38,103 +38,103 @@
 block discarded – undo
38 38
  * @since           4.0
39 39
  */
40 40
 if (function_exists('espresso_version')) {
41
-    if (! function_exists('espresso_duplicate_plugin_error')) {
42
-        /**
43
-         *    espresso_duplicate_plugin_error
44
-         *    displays if more than one version of EE is activated at the same time
45
-         */
46
-        function espresso_duplicate_plugin_error()
47
-        {
48
-            ?>
41
+	if (! function_exists('espresso_duplicate_plugin_error')) {
42
+		/**
43
+		 *    espresso_duplicate_plugin_error
44
+		 *    displays if more than one version of EE is activated at the same time
45
+		 */
46
+		function espresso_duplicate_plugin_error()
47
+		{
48
+			?>
49 49
             <div class="error">
50 50
                 <p>
51 51
                     <?php
52
-                    echo esc_html__(
53
-                        'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
54
-                        'event_espresso'
55
-                    ); ?>
52
+					echo esc_html__(
53
+						'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
54
+						'event_espresso'
55
+					); ?>
56 56
                 </p>
57 57
             </div>
58 58
             <?php
59
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
60
-        }
61
-    }
62
-    add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
59
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
60
+		}
61
+	}
62
+	add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
63 63
 } else {
64
-    define('EE_MIN_PHP_VER_REQUIRED', '5.4.0');
65
-    if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
66
-        /**
67
-         * espresso_minimum_php_version_error
68
-         *
69
-         * @return void
70
-         */
71
-        function espresso_minimum_php_version_error()
72
-        {
73
-            ?>
64
+	define('EE_MIN_PHP_VER_REQUIRED', '5.4.0');
65
+	if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
66
+		/**
67
+		 * espresso_minimum_php_version_error
68
+		 *
69
+		 * @return void
70
+		 */
71
+		function espresso_minimum_php_version_error()
72
+		{
73
+			?>
74 74
             <div class="error">
75 75
                 <p>
76 76
                     <?php
77
-                    printf(
78
-                        esc_html__(
79
-                            'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
80
-                            'event_espresso'
81
-                        ),
82
-                        EE_MIN_PHP_VER_REQUIRED,
83
-                        PHP_VERSION,
84
-                        '<br/>',
85
-                        '<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
86
-                    );
87
-                    ?>
77
+					printf(
78
+						esc_html__(
79
+							'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
80
+							'event_espresso'
81
+						),
82
+						EE_MIN_PHP_VER_REQUIRED,
83
+						PHP_VERSION,
84
+						'<br/>',
85
+						'<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
86
+					);
87
+					?>
88 88
                 </p>
89 89
             </div>
90 90
             <?php
91
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
92
-        }
91
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
92
+		}
93 93
 
94
-        add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
95
-    } else {
96
-        define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
97
-        /**
98
-         * espresso_version
99
-         * Returns the plugin version
100
-         *
101
-         * @return string
102
-         */
103
-        function espresso_version()
104
-        {
105
-            return apply_filters('FHEE__espresso__espresso_version', '4.9.68.rc.017');
106
-        }
94
+		add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
95
+	} else {
96
+		define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
97
+		/**
98
+		 * espresso_version
99
+		 * Returns the plugin version
100
+		 *
101
+		 * @return string
102
+		 */
103
+		function espresso_version()
104
+		{
105
+			return apply_filters('FHEE__espresso__espresso_version', '4.9.68.rc.017');
106
+		}
107 107
 
108
-        /**
109
-         * espresso_plugin_activation
110
-         * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
111
-         */
112
-        function espresso_plugin_activation()
113
-        {
114
-            update_option('ee_espresso_activation', true);
115
-        }
108
+		/**
109
+		 * espresso_plugin_activation
110
+		 * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
111
+		 */
112
+		function espresso_plugin_activation()
113
+		{
114
+			update_option('ee_espresso_activation', true);
115
+		}
116 116
 
117
-        register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
117
+		register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
118 118
 
119
-        require_once __DIR__ . '/core/bootstrap_espresso.php';
120
-        bootstrap_espresso();
121
-    }
119
+		require_once __DIR__ . '/core/bootstrap_espresso.php';
120
+		bootstrap_espresso();
121
+	}
122 122
 }
123 123
 if (! function_exists('espresso_deactivate_plugin')) {
124
-    /**
125
-     *    deactivate_plugin
126
-     * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
127
-     *
128
-     * @access public
129
-     * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
130
-     * @return    void
131
-     */
132
-    function espresso_deactivate_plugin($plugin_basename = '')
133
-    {
134
-        if (! function_exists('deactivate_plugins')) {
135
-            require_once ABSPATH . 'wp-admin/includes/plugin.php';
136
-        }
137
-        unset($_GET['activate'], $_REQUEST['activate']);
138
-        deactivate_plugins($plugin_basename);
139
-    }
124
+	/**
125
+	 *    deactivate_plugin
126
+	 * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
127
+	 *
128
+	 * @access public
129
+	 * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
130
+	 * @return    void
131
+	 */
132
+	function espresso_deactivate_plugin($plugin_basename = '')
133
+	{
134
+		if (! function_exists('deactivate_plugins')) {
135
+			require_once ABSPATH . 'wp-admin/includes/plugin.php';
136
+		}
137
+		unset($_GET['activate'], $_REQUEST['activate']);
138
+		deactivate_plugins($plugin_basename);
139
+	}
140 140
 }
Please login to merge, or discard this patch.
core/EE_Dependency_Map.core.php 1 patch
Indentation   +1048 added lines, -1048 removed lines patch added patch discarded remove patch
@@ -20,1052 +20,1052 @@
 block discarded – undo
20 20
 class EE_Dependency_Map
21 21
 {
22 22
 
23
-    /**
24
-     * This means that the requested class dependency is not present in the dependency map
25
-     */
26
-    const not_registered = 0;
27
-
28
-    /**
29
-     * This instructs class loaders to ALWAYS return a newly instantiated object for the requested class.
30
-     */
31
-    const load_new_object = 1;
32
-
33
-    /**
34
-     * This instructs class loaders to return a previously instantiated and cached object for the requested class.
35
-     * IF a previously instantiated object does not exist, a new one will be created and added to the cache.
36
-     */
37
-    const load_from_cache = 2;
38
-
39
-    /**
40
-     * When registering a dependency,
41
-     * this indicates to keep any existing dependencies that already exist,
42
-     * and simply discard any new dependencies declared in the incoming data
43
-     */
44
-    const KEEP_EXISTING_DEPENDENCIES = 0;
45
-
46
-    /**
47
-     * When registering a dependency,
48
-     * this indicates to overwrite any existing dependencies that already exist using the incoming data
49
-     */
50
-    const OVERWRITE_DEPENDENCIES = 1;
51
-
52
-
53
-    /**
54
-     * @type EE_Dependency_Map $_instance
55
-     */
56
-    protected static $_instance;
57
-
58
-    /**
59
-     * @var ClassInterfaceCache $class_cache
60
-     */
61
-    private $class_cache;
62
-
63
-    /**
64
-     * @type RequestInterface $request
65
-     */
66
-    protected $request;
67
-
68
-    /**
69
-     * @type LegacyRequestInterface $legacy_request
70
-     */
71
-    protected $legacy_request;
72
-
73
-    /**
74
-     * @type ResponseInterface $response
75
-     */
76
-    protected $response;
77
-
78
-    /**
79
-     * @type LoaderInterface $loader
80
-     */
81
-    protected $loader;
82
-
83
-    /**
84
-     * @type array $_dependency_map
85
-     */
86
-    protected $_dependency_map = array();
87
-
88
-    /**
89
-     * @type array $_class_loaders
90
-     */
91
-    protected $_class_loaders = array();
92
-
93
-
94
-    /**
95
-     * EE_Dependency_Map constructor.
96
-     *
97
-     * @param ClassInterfaceCache $class_cache
98
-     */
99
-    protected function __construct(ClassInterfaceCache $class_cache)
100
-    {
101
-        $this->class_cache = $class_cache;
102
-        do_action('EE_Dependency_Map____construct', $this);
103
-    }
104
-
105
-
106
-    /**
107
-     * @return void
108
-     */
109
-    public function initialize()
110
-    {
111
-        $this->_register_core_dependencies();
112
-        $this->_register_core_class_loaders();
113
-        $this->_register_core_aliases();
114
-    }
115
-
116
-
117
-    /**
118
-     * @singleton method used to instantiate class object
119
-     * @param ClassInterfaceCache|null $class_cache
120
-     * @return EE_Dependency_Map
121
-     */
122
-    public static function instance(ClassInterfaceCache $class_cache = null)
123
-    {
124
-        // check if class object is instantiated, and instantiated properly
125
-        if (! self::$_instance instanceof EE_Dependency_Map
126
-            && $class_cache instanceof ClassInterfaceCache
127
-        ) {
128
-            self::$_instance = new EE_Dependency_Map($class_cache);
129
-        }
130
-        return self::$_instance;
131
-    }
132
-
133
-
134
-    /**
135
-     * @param RequestInterface $request
136
-     */
137
-    public function setRequest(RequestInterface $request)
138
-    {
139
-        $this->request = $request;
140
-    }
141
-
142
-
143
-    /**
144
-     * @param LegacyRequestInterface $legacy_request
145
-     */
146
-    public function setLegacyRequest(LegacyRequestInterface $legacy_request)
147
-    {
148
-        $this->legacy_request = $legacy_request;
149
-    }
150
-
151
-
152
-    /**
153
-     * @param ResponseInterface $response
154
-     */
155
-    public function setResponse(ResponseInterface $response)
156
-    {
157
-        $this->response = $response;
158
-    }
159
-
160
-
161
-    /**
162
-     * @param LoaderInterface $loader
163
-     */
164
-    public function setLoader(LoaderInterface $loader)
165
-    {
166
-        $this->loader = $loader;
167
-    }
168
-
169
-
170
-    /**
171
-     * @param string $class
172
-     * @param array  $dependencies
173
-     * @param int    $overwrite
174
-     * @return bool
175
-     */
176
-    public static function register_dependencies(
177
-        $class,
178
-        array $dependencies,
179
-        $overwrite = EE_Dependency_Map::KEEP_EXISTING_DEPENDENCIES
180
-    ) {
181
-        return self::$_instance->registerDependencies($class, $dependencies, $overwrite);
182
-    }
183
-
184
-
185
-    /**
186
-     * Assigns an array of class names and corresponding load sources (new or cached)
187
-     * to the class specified by the first parameter.
188
-     * IMPORTANT !!!
189
-     * The order of elements in the incoming $dependencies array MUST match
190
-     * the order of the constructor parameters for the class in question.
191
-     * This is especially important when overriding any existing dependencies that are registered.
192
-     * the third parameter controls whether any duplicate dependencies are overwritten or not.
193
-     *
194
-     * @param string $class
195
-     * @param array  $dependencies
196
-     * @param int    $overwrite
197
-     * @return bool
198
-     */
199
-    public function registerDependencies(
200
-        $class,
201
-        array $dependencies,
202
-        $overwrite = EE_Dependency_Map::KEEP_EXISTING_DEPENDENCIES
203
-    ) {
204
-        $class = trim($class, '\\');
205
-        $registered = false;
206
-        if (empty(self::$_instance->_dependency_map[ $class ])) {
207
-            self::$_instance->_dependency_map[ $class ] = array();
208
-        }
209
-        // we need to make sure that any aliases used when registering a dependency
210
-        // get resolved to the correct class name
211
-        foreach ($dependencies as $dependency => $load_source) {
212
-            $alias = self::$_instance->getFqnForAlias($dependency);
213
-            if ($overwrite === EE_Dependency_Map::OVERWRITE_DEPENDENCIES
214
-                || ! isset(self::$_instance->_dependency_map[ $class ][ $alias ])
215
-            ) {
216
-                unset($dependencies[ $dependency ]);
217
-                $dependencies[ $alias ] = $load_source;
218
-                $registered = true;
219
-            }
220
-        }
221
-        // now add our two lists of dependencies together.
222
-        // using Union (+=) favours the arrays in precedence from left to right,
223
-        // so $dependencies is NOT overwritten because it is listed first
224
-        // ie: with A = B + C, entries in B take precedence over duplicate entries in C
225
-        // Union is way faster than array_merge() but should be used with caution...
226
-        // especially with numerically indexed arrays
227
-        $dependencies += self::$_instance->_dependency_map[ $class ];
228
-        // now we need to ensure that the resulting dependencies
229
-        // array only has the entries that are required for the class
230
-        // so first count how many dependencies were originally registered for the class
231
-        $dependency_count = count(self::$_instance->_dependency_map[ $class ]);
232
-        // if that count is non-zero (meaning dependencies were already registered)
233
-        self::$_instance->_dependency_map[ $class ] = $dependency_count
234
-            // then truncate the  final array to match that count
235
-            ? array_slice($dependencies, 0, $dependency_count)
236
-            // otherwise just take the incoming array because nothing previously existed
237
-            : $dependencies;
238
-        return $registered;
239
-    }
240
-
241
-
242
-    /**
243
-     * @param string $class_name
244
-     * @param string $loader
245
-     * @return bool
246
-     * @throws DomainException
247
-     */
248
-    public static function register_class_loader($class_name, $loader = 'load_core')
249
-    {
250
-        if (! $loader instanceof Closure && strpos($class_name, '\\') !== false) {
251
-            throw new DomainException(
252
-                esc_html__('Don\'t use class loaders for FQCNs.', 'event_espresso')
253
-            );
254
-        }
255
-        // check that loader is callable or method starts with "load_" and exists in EE_Registry
256
-        if (! is_callable($loader)
257
-            && (
258
-                strpos($loader, 'load_') !== 0
259
-                || ! method_exists('EE_Registry', $loader)
260
-            )
261
-        ) {
262
-            throw new DomainException(
263
-                sprintf(
264
-                    esc_html__(
265
-                        '"%1$s" is not a valid loader method on EE_Registry.',
266
-                        'event_espresso'
267
-                    ),
268
-                    $loader
269
-                )
270
-            );
271
-        }
272
-        $class_name = self::$_instance->getFqnForAlias($class_name);
273
-        if (! isset(self::$_instance->_class_loaders[ $class_name ])) {
274
-            self::$_instance->_class_loaders[ $class_name ] = $loader;
275
-            return true;
276
-        }
277
-        return false;
278
-    }
279
-
280
-
281
-    /**
282
-     * @return array
283
-     */
284
-    public function dependency_map()
285
-    {
286
-        return $this->_dependency_map;
287
-    }
288
-
289
-
290
-    /**
291
-     * returns TRUE if dependency map contains a listing for the provided class name
292
-     *
293
-     * @param string $class_name
294
-     * @return boolean
295
-     */
296
-    public function has($class_name = '')
297
-    {
298
-        // all legacy models have the same dependencies
299
-        if (strpos($class_name, 'EEM_') === 0) {
300
-            $class_name = 'LEGACY_MODELS';
301
-        }
302
-        return isset($this->_dependency_map[ $class_name ]) ? true : false;
303
-    }
304
-
305
-
306
-    /**
307
-     * returns TRUE if dependency map contains a listing for the provided class name AND dependency
308
-     *
309
-     * @param string $class_name
310
-     * @param string $dependency
311
-     * @return bool
312
-     */
313
-    public function has_dependency_for_class($class_name = '', $dependency = '')
314
-    {
315
-        // all legacy models have the same dependencies
316
-        if (strpos($class_name, 'EEM_') === 0) {
317
-            $class_name = 'LEGACY_MODELS';
318
-        }
319
-        $dependency = $this->getFqnForAlias($dependency, $class_name);
320
-        return isset($this->_dependency_map[ $class_name ][ $dependency ])
321
-            ? true
322
-            : false;
323
-    }
324
-
325
-
326
-    /**
327
-     * returns loading strategy for whether a previously cached dependency should be loaded or a new instance returned
328
-     *
329
-     * @param string $class_name
330
-     * @param string $dependency
331
-     * @return int
332
-     */
333
-    public function loading_strategy_for_class_dependency($class_name = '', $dependency = '')
334
-    {
335
-        // all legacy models have the same dependencies
336
-        if (strpos($class_name, 'EEM_') === 0) {
337
-            $class_name = 'LEGACY_MODELS';
338
-        }
339
-        $dependency = $this->getFqnForAlias($dependency);
340
-        return $this->has_dependency_for_class($class_name, $dependency)
341
-            ? $this->_dependency_map[ $class_name ][ $dependency ]
342
-            : EE_Dependency_Map::not_registered;
343
-    }
344
-
345
-
346
-    /**
347
-     * @param string $class_name
348
-     * @return string | Closure
349
-     */
350
-    public function class_loader($class_name)
351
-    {
352
-        // all legacy models use load_model()
353
-        if (strpos($class_name, 'EEM_') === 0) {
354
-            return 'load_model';
355
-        }
356
-        // EE_CPT_*_Strategy classes like EE_CPT_Event_Strategy, EE_CPT_Venue_Strategy, etc
357
-        // perform strpos() first to avoid loading regex every time we load a class
358
-        if (strpos($class_name, 'EE_CPT_') === 0
359
-            && preg_match('/^EE_CPT_([a-zA-Z]+)_Strategy$/', $class_name)
360
-        ) {
361
-            return 'load_core';
362
-        }
363
-        $class_name = $this->getFqnForAlias($class_name);
364
-        return isset($this->_class_loaders[ $class_name ]) ? $this->_class_loaders[ $class_name ] : '';
365
-    }
366
-
367
-
368
-    /**
369
-     * @return array
370
-     */
371
-    public function class_loaders()
372
-    {
373
-        return $this->_class_loaders;
374
-    }
375
-
376
-
377
-    /**
378
-     * adds an alias for a classname
379
-     *
380
-     * @param string $fqcn      the class name that should be used (concrete class to replace interface)
381
-     * @param string $alias     the class name that would be type hinted for (abstract parent or interface)
382
-     * @param string $for_class the class that has the dependency (is type hinting for the interface)
383
-     */
384
-    public function add_alias($fqcn, $alias, $for_class = '')
385
-    {
386
-        $this->class_cache->addAlias($fqcn, $alias, $for_class);
387
-    }
388
-
389
-
390
-    /**
391
-     * Returns TRUE if the provided fully qualified name IS an alias
392
-     * WHY?
393
-     * Because if a class is type hinting for a concretion,
394
-     * then why would we need to find another class to supply it?
395
-     * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
396
-     * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
397
-     * Don't go looking for some substitute.
398
-     * Whereas if a class is type hinting for an interface...
399
-     * then we need to find an actual class to use.
400
-     * So the interface IS the alias for some other FQN,
401
-     * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
402
-     * represents some other class.
403
-     *
404
-     * @param string $fqn
405
-     * @param string $for_class
406
-     * @return bool
407
-     */
408
-    public function isAlias($fqn = '', $for_class = '')
409
-    {
410
-        return $this->class_cache->isAlias($fqn, $for_class);
411
-    }
412
-
413
-
414
-    /**
415
-     * Returns a FQN for provided alias if one exists, otherwise returns the original $alias
416
-     * functions recursively, so that multiple aliases can be used to drill down to a FQN
417
-     *  for example:
418
-     *      if the following two entries were added to the _aliases array:
419
-     *          array(
420
-     *              'interface_alias'           => 'some\namespace\interface'
421
-     *              'some\namespace\interface'  => 'some\namespace\classname'
422
-     *          )
423
-     *      then one could use EE_Registry::instance()->create( 'interface_alias' )
424
-     *      to load an instance of 'some\namespace\classname'
425
-     *
426
-     * @param string $alias
427
-     * @param string $for_class
428
-     * @return string
429
-     */
430
-    public function getFqnForAlias($alias = '', $for_class = '')
431
-    {
432
-        return (string) $this->class_cache->getFqnForAlias($alias, $for_class);
433
-    }
434
-
435
-
436
-    /**
437
-     * Registers the core dependencies and whether a previously instantiated object should be loaded from the cache,
438
-     * if one exists, or whether a new object should be generated every time the requested class is loaded.
439
-     * This is done by using the following class constants:
440
-     *        EE_Dependency_Map::load_from_cache - loads previously instantiated object
441
-     *        EE_Dependency_Map::load_new_object - generates a new object every time
442
-     */
443
-    protected function _register_core_dependencies()
444
-    {
445
-        $this->_dependency_map = array(
446
-            'EE_Request_Handler'                                                                                          => array(
447
-                'EE_Request' => EE_Dependency_Map::load_from_cache,
448
-            ),
449
-            'EE_System'                                                                                                   => array(
450
-                'EE_Registry'                                 => EE_Dependency_Map::load_from_cache,
451
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
452
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
453
-                'EE_Maintenance_Mode'                         => EE_Dependency_Map::load_from_cache,
454
-            ),
455
-            'EE_Session'                                                                                                  => array(
456
-                'EventEspresso\core\services\cache\TransientCacheStorage'  => EE_Dependency_Map::load_from_cache,
457
-                'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
458
-                'EventEspresso\core\services\request\Request'              => EE_Dependency_Map::load_from_cache,
459
-                'EventEspresso\core\services\session\SessionStartHandler'  => EE_Dependency_Map::load_from_cache,
460
-                'EE_Encryption'                                            => EE_Dependency_Map::load_from_cache,
461
-            ),
462
-            'EE_Cart'                                                                                                     => array(
463
-                'EE_Session' => EE_Dependency_Map::load_from_cache,
464
-            ),
465
-            'EE_Front_Controller'                                                                                         => array(
466
-                'EE_Registry'              => EE_Dependency_Map::load_from_cache,
467
-                'EE_Request_Handler'       => EE_Dependency_Map::load_from_cache,
468
-                'EE_Module_Request_Router' => EE_Dependency_Map::load_from_cache,
469
-            ),
470
-            'EE_Messenger_Collection_Loader'                                                                              => array(
471
-                'EE_Messenger_Collection' => EE_Dependency_Map::load_new_object,
472
-            ),
473
-            'EE_Message_Type_Collection_Loader'                                                                           => array(
474
-                'EE_Message_Type_Collection' => EE_Dependency_Map::load_new_object,
475
-            ),
476
-            'EE_Message_Resource_Manager'                                                                                 => array(
477
-                'EE_Messenger_Collection_Loader'    => EE_Dependency_Map::load_new_object,
478
-                'EE_Message_Type_Collection_Loader' => EE_Dependency_Map::load_new_object,
479
-                'EEM_Message_Template_Group'        => EE_Dependency_Map::load_from_cache,
480
-            ),
481
-            'EE_Message_Factory'                                                                                          => array(
482
-                'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
483
-            ),
484
-            'EE_messages'                                                                                                 => array(
485
-                'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
486
-            ),
487
-            'EE_Messages_Generator'                                                                                       => array(
488
-                'EE_Messages_Queue'                    => EE_Dependency_Map::load_new_object,
489
-                'EE_Messages_Data_Handler_Collection'  => EE_Dependency_Map::load_new_object,
490
-                'EE_Message_Template_Group_Collection' => EE_Dependency_Map::load_new_object,
491
-                'EEH_Parse_Shortcodes'                 => EE_Dependency_Map::load_from_cache,
492
-            ),
493
-            'EE_Messages_Processor'                                                                                       => array(
494
-                'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
495
-            ),
496
-            'EE_Messages_Queue'                                                                                           => array(
497
-                'EE_Message_Repository' => EE_Dependency_Map::load_new_object,
498
-            ),
499
-            'EE_Messages_Template_Defaults'                                                                               => array(
500
-                'EEM_Message_Template_Group' => EE_Dependency_Map::load_from_cache,
501
-                'EEM_Message_Template'       => EE_Dependency_Map::load_from_cache,
502
-            ),
503
-            'EE_Message_To_Generate_From_Request'                                                                         => array(
504
-                'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
505
-                'EE_Request_Handler'          => EE_Dependency_Map::load_from_cache,
506
-            ),
507
-            'EventEspresso\core\services\commands\CommandBus'                                                             => array(
508
-                'EventEspresso\core\services\commands\CommandHandlerManager' => EE_Dependency_Map::load_from_cache,
509
-            ),
510
-            'EventEspresso\services\commands\CommandHandler'                                                              => array(
511
-                'EE_Registry'         => EE_Dependency_Map::load_from_cache,
512
-                'CommandBusInterface' => EE_Dependency_Map::load_from_cache,
513
-            ),
514
-            'EventEspresso\core\services\commands\CommandHandlerManager'                                                  => array(
515
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
516
-            ),
517
-            'EventEspresso\core\services\commands\CompositeCommandHandler'                                                => array(
518
-                'EventEspresso\core\services\commands\CommandBus'     => EE_Dependency_Map::load_from_cache,
519
-                'EventEspresso\core\services\commands\CommandFactory' => EE_Dependency_Map::load_from_cache,
520
-            ),
521
-            'EventEspresso\core\services\commands\CommandFactory'                                                         => array(
522
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
523
-            ),
524
-            'EventEspresso\core\services\commands\middleware\CapChecker'                                                  => array(
525
-                'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
526
-            ),
527
-            'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker'                                         => array(
528
-                'EE_Capabilities' => EE_Dependency_Map::load_from_cache,
529
-            ),
530
-            'EventEspresso\core\domain\services\capabilities\RegistrationsCapChecker'                                     => array(
531
-                'EE_Capabilities' => EE_Dependency_Map::load_from_cache,
532
-            ),
533
-            'EventEspresso\core\services\commands\registration\CreateRegistrationCommandHandler'                          => array(
534
-                'EventEspresso\core\domain\services\registration\CreateRegistrationService' => EE_Dependency_Map::load_from_cache,
535
-            ),
536
-            'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommandHandler'                     => array(
537
-                'EventEspresso\core\domain\services\registration\CopyRegistrationService' => EE_Dependency_Map::load_from_cache,
538
-            ),
539
-            'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommandHandler'                    => array(
540
-                'EventEspresso\core\domain\services\registration\CopyRegistrationService' => EE_Dependency_Map::load_from_cache,
541
-            ),
542
-            'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler'         => array(
543
-                'EventEspresso\core\domain\services\registration\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
544
-            ),
545
-            'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler' => array(
546
-                'EventEspresso\core\domain\services\registration\UpdateRegistrationService' => EE_Dependency_Map::load_from_cache,
547
-            ),
548
-            'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommandHandler'                              => array(
549
-                'EventEspresso\core\domain\services\ticket\CreateTicketLineItemService' => EE_Dependency_Map::load_from_cache,
550
-            ),
551
-            'EventEspresso\core\services\commands\ticket\CancelTicketLineItemCommandHandler'                              => array(
552
-                'EventEspresso\core\domain\services\ticket\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
553
-            ),
554
-            'EventEspresso\core\domain\services\registration\CancelRegistrationService'                                   => array(
555
-                'EventEspresso\core\domain\services\ticket\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
556
-            ),
557
-            'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler'                                  => array(
558
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
559
-            ),
560
-            'EventEspresso\core\services\database\TableManager'                                                           => array(
561
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
562
-            ),
563
-            'EE_Data_Migration_Class_Base'                                                                                => array(
564
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
565
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
566
-            ),
567
-            'EE_DMS_Core_4_1_0'                                                                                           => array(
568
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
569
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
570
-            ),
571
-            'EE_DMS_Core_4_2_0'                                                                                           => array(
572
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
573
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
574
-            ),
575
-            'EE_DMS_Core_4_3_0'                                                                                           => array(
576
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
577
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
578
-            ),
579
-            'EE_DMS_Core_4_4_0'                                                                                           => array(
580
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
581
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
582
-            ),
583
-            'EE_DMS_Core_4_5_0'                                                                                           => array(
584
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
585
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
586
-            ),
587
-            'EE_DMS_Core_4_6_0'                                                                                           => array(
588
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
589
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
590
-            ),
591
-            'EE_DMS_Core_4_7_0'                                                                                           => array(
592
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
593
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
594
-            ),
595
-            'EE_DMS_Core_4_8_0'                                                                                           => array(
596
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
597
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
598
-            ),
599
-            'EE_DMS_Core_4_9_0'                                                                                           => array(
600
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
601
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
602
-            ),
603
-            'EventEspresso\core\services\assets\I18nRegistry'                                                             => array(
604
-                array(),
605
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
606
-            ),
607
-            'EventEspresso\core\services\assets\Registry'                                                                 => array(
608
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
609
-                'EventEspresso\core\services\assets\I18nRegistry'    => EE_Dependency_Map::load_from_cache,
610
-            ),
611
-            'EventEspresso\core\domain\entities\shortcodes\EspressoCancelled'                                             => array(
612
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
613
-            ),
614
-            'EventEspresso\core\domain\entities\shortcodes\EspressoCheckout'                                              => array(
615
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
616
-            ),
617
-            'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees'                                        => array(
618
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
619
-            ),
620
-            'EventEspresso\core\domain\entities\shortcodes\EspressoEvents'                                                => array(
621
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
622
-            ),
623
-            'EventEspresso\core\domain\entities\shortcodes\EspressoThankYou'                                              => array(
624
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
625
-            ),
626
-            'EventEspresso\core\domain\entities\shortcodes\EspressoTicketSelector'                                        => array(
627
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
628
-            ),
629
-            'EventEspresso\core\domain\entities\shortcodes\EspressoTxnPage'                                               => array(
630
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
631
-            ),
632
-            'EventEspresso\core\services\cache\BasicCacheManager'                                                         => array(
633
-                'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
634
-            ),
635
-            'EventEspresso\core\services\cache\PostRelatedCacheManager'                                                   => array(
636
-                'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
637
-            ),
638
-            'EventEspresso\core\domain\services\validation\email\EmailValidationService'                                  => array(
639
-                'EE_Registration_Config'                     => EE_Dependency_Map::load_from_cache,
640
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
641
-            ),
642
-            'EventEspresso\core\domain\values\EmailAddress'                                                               => array(
643
-                null,
644
-                'EventEspresso\core\domain\services\validation\email\EmailValidationService' => EE_Dependency_Map::load_from_cache,
645
-            ),
646
-            'EventEspresso\core\services\orm\ModelFieldFactory'                                                           => array(
647
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
648
-            ),
649
-            'LEGACY_MODELS'                                                                                               => array(
650
-                null,
651
-                'EventEspresso\core\services\database\ModelFieldFactory' => EE_Dependency_Map::load_from_cache,
652
-            ),
653
-            'EE_Module_Request_Router'                                                                                    => array(
654
-                'EE_Request' => EE_Dependency_Map::load_from_cache,
655
-            ),
656
-            'EE_Registration_Processor'                                                                                   => array(
657
-                'EE_Request' => EE_Dependency_Map::load_from_cache,
658
-            ),
659
-            'EventEspresso\core\services\notifications\PersistentAdminNoticeManager'                                      => array(
660
-                null,
661
-                'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
662
-                'EventEspresso\core\services\request\Request'                         => EE_Dependency_Map::load_from_cache,
663
-            ),
664
-            'EventEspresso\core\services\licensing\LicenseService'                                                        => array(
665
-                'EventEspresso\core\domain\services\pue\Stats'  => EE_Dependency_Map::load_from_cache,
666
-                'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache,
667
-            ),
668
-            'EE_Admin_Transactions_List_Table'                                                                            => array(
669
-                null,
670
-                'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
671
-            ),
672
-            'EventEspresso\core\domain\services\pue\Stats'                                                                => array(
673
-                'EventEspresso\core\domain\services\pue\Config'        => EE_Dependency_Map::load_from_cache,
674
-                'EE_Maintenance_Mode'                                  => EE_Dependency_Map::load_from_cache,
675
-                'EventEspresso\core\domain\services\pue\StatsGatherer' => EE_Dependency_Map::load_from_cache,
676
-            ),
677
-            'EventEspresso\core\domain\services\pue\Config'                                                               => array(
678
-                'EE_Network_Config' => EE_Dependency_Map::load_from_cache,
679
-                'EE_Config'         => EE_Dependency_Map::load_from_cache,
680
-            ),
681
-            'EventEspresso\core\domain\services\pue\StatsGatherer'                                                        => array(
682
-                'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
683
-                'EEM_Event'          => EE_Dependency_Map::load_from_cache,
684
-                'EEM_Datetime'       => EE_Dependency_Map::load_from_cache,
685
-                'EEM_Ticket'         => EE_Dependency_Map::load_from_cache,
686
-                'EEM_Registration'   => EE_Dependency_Map::load_from_cache,
687
-                'EEM_Transaction'    => EE_Dependency_Map::load_from_cache,
688
-                'EE_Config'          => EE_Dependency_Map::load_from_cache,
689
-            ),
690
-            'EventEspresso\core\domain\services\admin\ExitModal'                                                          => array(
691
-                'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache,
692
-            ),
693
-            'EventEspresso\core\domain\services\admin\PluginUpsells'                                                      => array(
694
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
695
-            ),
696
-            'EventEspresso\caffeinated\modules\recaptcha_invisible\InvisibleRecaptcha'                                    => array(
697
-                'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
698
-                'EE_Session'             => EE_Dependency_Map::load_from_cache,
699
-            ),
700
-            'EventEspresso\caffeinated\modules\recaptcha_invisible\RecaptchaAdminSettings'                                => array(
701
-                'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
702
-            ),
703
-            'EventEspresso\modules\ticket_selector\ProcessTicketSelector'                                                 => array(
704
-                'EE_Core_Config'                                                          => EE_Dependency_Map::load_from_cache,
705
-                'EventEspresso\core\services\request\Request'                             => EE_Dependency_Map::load_from_cache,
706
-                'EE_Session'                                                              => EE_Dependency_Map::load_from_cache,
707
-                'EEM_Ticket'                                                              => EE_Dependency_Map::load_from_cache,
708
-                'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker' => EE_Dependency_Map::load_from_cache,
709
-            ),
710
-            'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker'                                     => array(
711
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
712
-            ),
713
-            'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'                              => array(
714
-                'EE_Core_Config'                             => EE_Dependency_Map::load_from_cache,
715
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
716
-            ),
717
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes'                                => array(
718
-                'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
719
-            ),
720
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomies'                               => array(
721
-                'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
722
-            ),
723
-            'EE_CPT_Strategy'                                                                                             => array(
724
-                'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
725
-                'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
726
-            ),
727
-            'EventEspresso\core\services\loaders\ObjectIdentifier'                                                        => array(
728
-                'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
729
-            ),
730
-            'EventEspresso\core\domain\services\assets\CoreAssetManager'                                                  => array(
731
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
732
-                'EE_Currency_Config'                                 => EE_Dependency_Map::load_from_cache,
733
-                'EE_Template_Config'                                 => EE_Dependency_Map::load_from_cache,
734
-                'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
735
-                'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
736
-            ),
737
-            'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy' => array(
738
-                'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
739
-                'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache
740
-            ),
741
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee' => array(
742
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
743
-            ),
744
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData' => array(
745
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
746
-                'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache
747
-            ),
748
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins' => array(
749
-                'EEM_Checkin' => EE_Dependency_Map::load_from_cache,
750
-            ),
751
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration' => array(
752
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache,
753
-            ),
754
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction' => array(
755
-                'EEM_Transaction' => EE_Dependency_Map::load_from_cache,
756
-            ),
757
-            'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData' => array(
758
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
759
-            ),
760
-            'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers' => array(
761
-                'EEM_Answer' => EE_Dependency_Map::load_from_cache,
762
-                'EEM_Question' => EE_Dependency_Map::load_from_cache,
763
-            ),
764
-            'EventEspresso\core\CPTs\CptQueryModifier' => array(
765
-                null,
766
-                null,
767
-                null,
768
-                'EE_Request_Handler'                          => EE_Dependency_Map::load_from_cache,
769
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
770
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
771
-            ),
772
-            'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler' => array(
773
-                'EE_Registry' => EE_Dependency_Map::load_from_cache,
774
-                'EE_Config' => EE_Dependency_Map::load_from_cache
775
-            ),
776
-            'EventEspresso\core\services\editor\BlockRegistrationManager'                                                 => array(
777
-                'EventEspresso\core\services\assets\BlockAssetManagerCollection' => EE_Dependency_Map::load_from_cache,
778
-                'EventEspresso\core\domain\entities\editor\BlockCollection'      => EE_Dependency_Map::load_from_cache,
779
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => EE_Dependency_Map::load_from_cache,
780
-                'EventEspresso\core\services\request\Request'                    => EE_Dependency_Map::load_from_cache,
781
-            ),
782
-            'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => array(
783
-                'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
784
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
785
-                'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
786
-            ),
787
-            'EventEspresso\core\domain\entities\editor\blocks\EventAttendees' => array(
788
-                'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => self::load_from_cache,
789
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
790
-                'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees' => self::load_from_cache,
791
-            ),
792
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => array(
793
-                'EventEspresso\core\services\container\Mirror' => EE_Dependency_Map::load_from_cache,
794
-                'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
795
-                'EE_Dependency_Map' => EE_Dependency_Map::load_from_cache,
796
-            ),
797
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' => array(
798
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => EE_Dependency_Map::load_from_cache,
799
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
800
-            ),
801
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => array(
802
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationCollection' => EE_Dependency_Map::load_from_cache,
803
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' => EE_Dependency_Map::load_from_cache,
804
-            ),
805
-            'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => array(
806
-                'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache
807
-            ),
808
-            'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => array(
809
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
810
-            ),
811
-            'EventEspresso\core\libraries\rest_api\controllers\model\Read' => array(
812
-                'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache
813
-            ),
814
-            'EventEspresso\core\libraries\rest_api\calculations\Datetime' => array(
815
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
816
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache
817
-            ),
818
-            'EventEspresso\core\libraries\rest_api\calculations\Event' => array(
819
-                'EEM_Event' => EE_Dependency_Map::load_from_cache,
820
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache
821
-            ),
822
-            'EventEspresso\core\libraries\rest_api\calculations\Registration' => array(
823
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache
824
-            ),
825
-            'EventEspresso\core\services\session\SessionStartHandler' => array(
826
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
827
-            ),
828
-            'EE_URL_Validation_Strategy' => array(
829
-                null,
830
-                null,
831
-                'EventEspresso\core\services\validators\URLValidator' => EE_Dependency_Map::load_from_cache
832
-            ),
833
-        );
834
-    }
835
-
836
-
837
-    /**
838
-     * Registers how core classes are loaded.
839
-     * This can either be done by simply providing the name of one of the EE_Registry loader methods such as:
840
-     *        'EE_Request_Handler' => 'load_core'
841
-     *        'EE_Messages_Queue'  => 'load_lib'
842
-     *        'EEH_Debug_Tools'    => 'load_helper'
843
-     * or, if greater control is required, by providing a custom closure. For example:
844
-     *        'Some_Class' => function () {
845
-     *            return new Some_Class();
846
-     *        },
847
-     * This is required for instantiating dependencies
848
-     * where an interface has been type hinted in a class constructor. For example:
849
-     *        'Required_Interface' => function () {
850
-     *            return new A_Class_That_Implements_Required_Interface();
851
-     *        },
852
-     */
853
-    protected function _register_core_class_loaders()
854
-    {
855
-        $this->_class_loaders = array(
856
-            // load_core
857
-            'EE_Dependency_Map'                            => function () {
858
-                return $this;
859
-            },
860
-            'EE_Capabilities'                              => 'load_core',
861
-            'EE_Encryption'                                => 'load_core',
862
-            'EE_Front_Controller'                          => 'load_core',
863
-            'EE_Module_Request_Router'                     => 'load_core',
864
-            'EE_Registry'                                  => 'load_core',
865
-            'EE_Request'                                   => function () {
866
-                return $this->legacy_request;
867
-            },
868
-            'EventEspresso\core\services\request\Request'  => function () {
869
-                return $this->request;
870
-            },
871
-            'EventEspresso\core\services\request\Response' => function () {
872
-                return $this->response;
873
-            },
874
-            'EE_Base'                                      => 'load_core',
875
-            'EE_Request_Handler'                           => 'load_core',
876
-            'EE_Session'                                   => 'load_core',
877
-            'EE_Cron_Tasks'                                => 'load_core',
878
-            'EE_System'                                    => 'load_core',
879
-            'EE_Maintenance_Mode'                          => 'load_core',
880
-            'EE_Register_CPTs'                             => 'load_core',
881
-            'EE_Admin'                                     => 'load_core',
882
-            'EE_CPT_Strategy'                              => 'load_core',
883
-            // load_lib
884
-            'EE_Message_Resource_Manager'                  => 'load_lib',
885
-            'EE_Message_Type_Collection'                   => 'load_lib',
886
-            'EE_Message_Type_Collection_Loader'            => 'load_lib',
887
-            'EE_Messenger_Collection'                      => 'load_lib',
888
-            'EE_Messenger_Collection_Loader'               => 'load_lib',
889
-            'EE_Messages_Processor'                        => 'load_lib',
890
-            'EE_Message_Repository'                        => 'load_lib',
891
-            'EE_Messages_Queue'                            => 'load_lib',
892
-            'EE_Messages_Data_Handler_Collection'          => 'load_lib',
893
-            'EE_Message_Template_Group_Collection'         => 'load_lib',
894
-            'EE_Payment_Method_Manager'                    => 'load_lib',
895
-            'EE_Messages_Generator'                        => function () {
896
-                return EE_Registry::instance()->load_lib(
897
-                    'Messages_Generator',
898
-                    array(),
899
-                    false,
900
-                    false
901
-                );
902
-            },
903
-            'EE_Messages_Template_Defaults'                => function ($arguments = array()) {
904
-                return EE_Registry::instance()->load_lib(
905
-                    'Messages_Template_Defaults',
906
-                    $arguments,
907
-                    false,
908
-                    false
909
-                );
910
-            },
911
-            // load_helper
912
-            'EEH_Parse_Shortcodes'                         => function () {
913
-                if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
914
-                    return new EEH_Parse_Shortcodes();
915
-                }
916
-                return null;
917
-            },
918
-            'EE_Template_Config'                           => function () {
919
-                return EE_Config::instance()->template_settings;
920
-            },
921
-            'EE_Currency_Config'                           => function () {
922
-                return EE_Config::instance()->currency;
923
-            },
924
-            'EE_Registration_Config'                       => function () {
925
-                return EE_Config::instance()->registration;
926
-            },
927
-            'EE_Core_Config'                               => function () {
928
-                return EE_Config::instance()->core;
929
-            },
930
-            'EventEspresso\core\services\loaders\Loader'   => function () {
931
-                return LoaderFactory::getLoader();
932
-            },
933
-            'EE_Network_Config'                            => function () {
934
-                return EE_Network_Config::instance();
935
-            },
936
-            'EE_Config'                                    => function () {
937
-                return EE_Config::instance();
938
-            },
939
-            'EventEspresso\core\domain\Domain'             => function () {
940
-                return DomainFactory::getEventEspressoCoreDomain();
941
-            },
942
-            'EE_Admin_Config'                              => function () {
943
-                return EE_Config::instance()->admin;
944
-            },
945
-        );
946
-    }
947
-
948
-
949
-    /**
950
-     * can be used for supplying alternate names for classes,
951
-     * or for connecting interface names to instantiable classes
952
-     */
953
-    protected function _register_core_aliases()
954
-    {
955
-        $aliases = array(
956
-            'CommandBusInterface'                                                          => 'EventEspresso\core\services\commands\CommandBusInterface',
957
-            'EventEspresso\core\services\commands\CommandBusInterface'                     => 'EventEspresso\core\services\commands\CommandBus',
958
-            'CommandHandlerManagerInterface'                                               => 'EventEspresso\core\services\commands\CommandHandlerManagerInterface',
959
-            'EventEspresso\core\services\commands\CommandHandlerManagerInterface'          => 'EventEspresso\core\services\commands\CommandHandlerManager',
960
-            'CapChecker'                                                                   => 'EventEspresso\core\services\commands\middleware\CapChecker',
961
-            'AddActionHook'                                                                => 'EventEspresso\core\services\commands\middleware\AddActionHook',
962
-            'CapabilitiesChecker'                                                          => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
963
-            'CapabilitiesCheckerInterface'                                                 => 'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface',
964
-            'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface' => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
965
-            'CreateRegistrationService'                                                    => 'EventEspresso\core\domain\services\registration\CreateRegistrationService',
966
-            'CreateRegistrationCommandHandler'                                             => 'EventEspresso\core\services\commands\registration\CreateRegistrationCommand',
967
-            'CopyRegistrationDetailsCommandHandler'                                        => 'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommand',
968
-            'CopyRegistrationPaymentsCommandHandler'                                       => 'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommand',
969
-            'CancelRegistrationAndTicketLineItemCommandHandler'                            => 'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler',
970
-            'UpdateRegistrationAndTransactionAfterChangeCommandHandler'                    => 'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler',
971
-            'CreateTicketLineItemCommandHandler'                                           => 'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommand',
972
-            'CreateTransactionCommandHandler'                                              => 'EventEspresso\core\services\commands\transaction\CreateTransactionCommandHandler',
973
-            'CreateAttendeeCommandHandler'                                                 => 'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler',
974
-            'TableManager'                                                                 => 'EventEspresso\core\services\database\TableManager',
975
-            'TableAnalysis'                                                                => 'EventEspresso\core\services\database\TableAnalysis',
976
-            'EspressoShortcode'                                                            => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
977
-            'ShortcodeInterface'                                                           => 'EventEspresso\core\services\shortcodes\ShortcodeInterface',
978
-            'EventEspresso\core\services\shortcodes\ShortcodeInterface'                    => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
979
-            'EventEspresso\core\services\cache\CacheStorageInterface'                      => 'EventEspresso\core\services\cache\TransientCacheStorage',
980
-            'LoaderInterface'                                                              => 'EventEspresso\core\services\loaders\LoaderInterface',
981
-            'EventEspresso\core\services\loaders\LoaderInterface'                          => 'EventEspresso\core\services\loaders\Loader',
982
-            'CommandFactoryInterface'                                                      => 'EventEspresso\core\services\commands\CommandFactoryInterface',
983
-            'EventEspresso\core\services\commands\CommandFactoryInterface'                 => 'EventEspresso\core\services\commands\CommandFactory',
984
-            'EmailValidatorInterface'                                                      => 'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface',
985
-            'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface'  => 'EventEspresso\core\domain\services\validation\email\EmailValidationService',
986
-            'NoticeConverterInterface'                                                     => 'EventEspresso\core\services\notices\NoticeConverterInterface',
987
-            'EventEspresso\core\services\notices\NoticeConverterInterface'                 => 'EventEspresso\core\services\notices\ConvertNoticesToEeErrors',
988
-            'NoticesContainerInterface'                                                    => 'EventEspresso\core\services\notices\NoticesContainerInterface',
989
-            'EventEspresso\core\services\notices\NoticesContainerInterface'                => 'EventEspresso\core\services\notices\NoticesContainer',
990
-            'EventEspresso\core\services\request\RequestInterface'                         => 'EventEspresso\core\services\request\Request',
991
-            'EventEspresso\core\services\request\ResponseInterface'                        => 'EventEspresso\core\services\request\Response',
992
-            'EventEspresso\core\domain\DomainInterface'                                    => 'EventEspresso\core\domain\Domain',
993
-        );
994
-        foreach ($aliases as $alias => $fqn) {
995
-            if (is_array($fqn)) {
996
-                foreach ($fqn as $class => $for_class) {
997
-                    $this->class_cache->addAlias($class, $alias, $for_class);
998
-                }
999
-                continue;
1000
-            }
1001
-            $this->class_cache->addAlias($fqn, $alias);
1002
-        }
1003
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
1004
-            $this->class_cache->addAlias(
1005
-                'EventEspresso\core\services\notices\ConvertNoticesToAdminNotices',
1006
-                'EventEspresso\core\services\notices\NoticeConverterInterface'
1007
-            );
1008
-        }
1009
-    }
1010
-
1011
-
1012
-    /**
1013
-     * This is used to reset the internal map and class_loaders to their original default state at the beginning of the
1014
-     * request Primarily used by unit tests.
1015
-     */
1016
-    public function reset()
1017
-    {
1018
-        $this->_register_core_class_loaders();
1019
-        $this->_register_core_dependencies();
1020
-    }
1021
-
1022
-
1023
-    /**
1024
-     * PLZ NOTE: a better name for this method would be is_alias()
1025
-     * because it returns TRUE if the provided fully qualified name IS an alias
1026
-     * WHY?
1027
-     * Because if a class is type hinting for a concretion,
1028
-     * then why would we need to find another class to supply it?
1029
-     * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
1030
-     * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
1031
-     * Don't go looking for some substitute.
1032
-     * Whereas if a class is type hinting for an interface...
1033
-     * then we need to find an actual class to use.
1034
-     * So the interface IS the alias for some other FQN,
1035
-     * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
1036
-     * represents some other class.
1037
-     *
1038
-     * @deprecated 4.9.62.p
1039
-     * @param string $fqn
1040
-     * @param string $for_class
1041
-     * @return bool
1042
-     */
1043
-    public function has_alias($fqn = '', $for_class = '')
1044
-    {
1045
-        return $this->isAlias($fqn, $for_class);
1046
-    }
1047
-
1048
-
1049
-    /**
1050
-     * PLZ NOTE: a better name for this method would be get_fqn_for_alias()
1051
-     * because it returns a FQN for provided alias if one exists, otherwise returns the original $alias
1052
-     * functions recursively, so that multiple aliases can be used to drill down to a FQN
1053
-     *  for example:
1054
-     *      if the following two entries were added to the _aliases array:
1055
-     *          array(
1056
-     *              'interface_alias'           => 'some\namespace\interface'
1057
-     *              'some\namespace\interface'  => 'some\namespace\classname'
1058
-     *          )
1059
-     *      then one could use EE_Registry::instance()->create( 'interface_alias' )
1060
-     *      to load an instance of 'some\namespace\classname'
1061
-     *
1062
-     * @deprecated 4.9.62.p
1063
-     * @param string $alias
1064
-     * @param string $for_class
1065
-     * @return string
1066
-     */
1067
-    public function get_alias($alias = '', $for_class = '')
1068
-    {
1069
-        return $this->getFqnForAlias($alias, $for_class);
1070
-    }
23
+	/**
24
+	 * This means that the requested class dependency is not present in the dependency map
25
+	 */
26
+	const not_registered = 0;
27
+
28
+	/**
29
+	 * This instructs class loaders to ALWAYS return a newly instantiated object for the requested class.
30
+	 */
31
+	const load_new_object = 1;
32
+
33
+	/**
34
+	 * This instructs class loaders to return a previously instantiated and cached object for the requested class.
35
+	 * IF a previously instantiated object does not exist, a new one will be created and added to the cache.
36
+	 */
37
+	const load_from_cache = 2;
38
+
39
+	/**
40
+	 * When registering a dependency,
41
+	 * this indicates to keep any existing dependencies that already exist,
42
+	 * and simply discard any new dependencies declared in the incoming data
43
+	 */
44
+	const KEEP_EXISTING_DEPENDENCIES = 0;
45
+
46
+	/**
47
+	 * When registering a dependency,
48
+	 * this indicates to overwrite any existing dependencies that already exist using the incoming data
49
+	 */
50
+	const OVERWRITE_DEPENDENCIES = 1;
51
+
52
+
53
+	/**
54
+	 * @type EE_Dependency_Map $_instance
55
+	 */
56
+	protected static $_instance;
57
+
58
+	/**
59
+	 * @var ClassInterfaceCache $class_cache
60
+	 */
61
+	private $class_cache;
62
+
63
+	/**
64
+	 * @type RequestInterface $request
65
+	 */
66
+	protected $request;
67
+
68
+	/**
69
+	 * @type LegacyRequestInterface $legacy_request
70
+	 */
71
+	protected $legacy_request;
72
+
73
+	/**
74
+	 * @type ResponseInterface $response
75
+	 */
76
+	protected $response;
77
+
78
+	/**
79
+	 * @type LoaderInterface $loader
80
+	 */
81
+	protected $loader;
82
+
83
+	/**
84
+	 * @type array $_dependency_map
85
+	 */
86
+	protected $_dependency_map = array();
87
+
88
+	/**
89
+	 * @type array $_class_loaders
90
+	 */
91
+	protected $_class_loaders = array();
92
+
93
+
94
+	/**
95
+	 * EE_Dependency_Map constructor.
96
+	 *
97
+	 * @param ClassInterfaceCache $class_cache
98
+	 */
99
+	protected function __construct(ClassInterfaceCache $class_cache)
100
+	{
101
+		$this->class_cache = $class_cache;
102
+		do_action('EE_Dependency_Map____construct', $this);
103
+	}
104
+
105
+
106
+	/**
107
+	 * @return void
108
+	 */
109
+	public function initialize()
110
+	{
111
+		$this->_register_core_dependencies();
112
+		$this->_register_core_class_loaders();
113
+		$this->_register_core_aliases();
114
+	}
115
+
116
+
117
+	/**
118
+	 * @singleton method used to instantiate class object
119
+	 * @param ClassInterfaceCache|null $class_cache
120
+	 * @return EE_Dependency_Map
121
+	 */
122
+	public static function instance(ClassInterfaceCache $class_cache = null)
123
+	{
124
+		// check if class object is instantiated, and instantiated properly
125
+		if (! self::$_instance instanceof EE_Dependency_Map
126
+			&& $class_cache instanceof ClassInterfaceCache
127
+		) {
128
+			self::$_instance = new EE_Dependency_Map($class_cache);
129
+		}
130
+		return self::$_instance;
131
+	}
132
+
133
+
134
+	/**
135
+	 * @param RequestInterface $request
136
+	 */
137
+	public function setRequest(RequestInterface $request)
138
+	{
139
+		$this->request = $request;
140
+	}
141
+
142
+
143
+	/**
144
+	 * @param LegacyRequestInterface $legacy_request
145
+	 */
146
+	public function setLegacyRequest(LegacyRequestInterface $legacy_request)
147
+	{
148
+		$this->legacy_request = $legacy_request;
149
+	}
150
+
151
+
152
+	/**
153
+	 * @param ResponseInterface $response
154
+	 */
155
+	public function setResponse(ResponseInterface $response)
156
+	{
157
+		$this->response = $response;
158
+	}
159
+
160
+
161
+	/**
162
+	 * @param LoaderInterface $loader
163
+	 */
164
+	public function setLoader(LoaderInterface $loader)
165
+	{
166
+		$this->loader = $loader;
167
+	}
168
+
169
+
170
+	/**
171
+	 * @param string $class
172
+	 * @param array  $dependencies
173
+	 * @param int    $overwrite
174
+	 * @return bool
175
+	 */
176
+	public static function register_dependencies(
177
+		$class,
178
+		array $dependencies,
179
+		$overwrite = EE_Dependency_Map::KEEP_EXISTING_DEPENDENCIES
180
+	) {
181
+		return self::$_instance->registerDependencies($class, $dependencies, $overwrite);
182
+	}
183
+
184
+
185
+	/**
186
+	 * Assigns an array of class names and corresponding load sources (new or cached)
187
+	 * to the class specified by the first parameter.
188
+	 * IMPORTANT !!!
189
+	 * The order of elements in the incoming $dependencies array MUST match
190
+	 * the order of the constructor parameters for the class in question.
191
+	 * This is especially important when overriding any existing dependencies that are registered.
192
+	 * the third parameter controls whether any duplicate dependencies are overwritten or not.
193
+	 *
194
+	 * @param string $class
195
+	 * @param array  $dependencies
196
+	 * @param int    $overwrite
197
+	 * @return bool
198
+	 */
199
+	public function registerDependencies(
200
+		$class,
201
+		array $dependencies,
202
+		$overwrite = EE_Dependency_Map::KEEP_EXISTING_DEPENDENCIES
203
+	) {
204
+		$class = trim($class, '\\');
205
+		$registered = false;
206
+		if (empty(self::$_instance->_dependency_map[ $class ])) {
207
+			self::$_instance->_dependency_map[ $class ] = array();
208
+		}
209
+		// we need to make sure that any aliases used when registering a dependency
210
+		// get resolved to the correct class name
211
+		foreach ($dependencies as $dependency => $load_source) {
212
+			$alias = self::$_instance->getFqnForAlias($dependency);
213
+			if ($overwrite === EE_Dependency_Map::OVERWRITE_DEPENDENCIES
214
+				|| ! isset(self::$_instance->_dependency_map[ $class ][ $alias ])
215
+			) {
216
+				unset($dependencies[ $dependency ]);
217
+				$dependencies[ $alias ] = $load_source;
218
+				$registered = true;
219
+			}
220
+		}
221
+		// now add our two lists of dependencies together.
222
+		// using Union (+=) favours the arrays in precedence from left to right,
223
+		// so $dependencies is NOT overwritten because it is listed first
224
+		// ie: with A = B + C, entries in B take precedence over duplicate entries in C
225
+		// Union is way faster than array_merge() but should be used with caution...
226
+		// especially with numerically indexed arrays
227
+		$dependencies += self::$_instance->_dependency_map[ $class ];
228
+		// now we need to ensure that the resulting dependencies
229
+		// array only has the entries that are required for the class
230
+		// so first count how many dependencies were originally registered for the class
231
+		$dependency_count = count(self::$_instance->_dependency_map[ $class ]);
232
+		// if that count is non-zero (meaning dependencies were already registered)
233
+		self::$_instance->_dependency_map[ $class ] = $dependency_count
234
+			// then truncate the  final array to match that count
235
+			? array_slice($dependencies, 0, $dependency_count)
236
+			// otherwise just take the incoming array because nothing previously existed
237
+			: $dependencies;
238
+		return $registered;
239
+	}
240
+
241
+
242
+	/**
243
+	 * @param string $class_name
244
+	 * @param string $loader
245
+	 * @return bool
246
+	 * @throws DomainException
247
+	 */
248
+	public static function register_class_loader($class_name, $loader = 'load_core')
249
+	{
250
+		if (! $loader instanceof Closure && strpos($class_name, '\\') !== false) {
251
+			throw new DomainException(
252
+				esc_html__('Don\'t use class loaders for FQCNs.', 'event_espresso')
253
+			);
254
+		}
255
+		// check that loader is callable or method starts with "load_" and exists in EE_Registry
256
+		if (! is_callable($loader)
257
+			&& (
258
+				strpos($loader, 'load_') !== 0
259
+				|| ! method_exists('EE_Registry', $loader)
260
+			)
261
+		) {
262
+			throw new DomainException(
263
+				sprintf(
264
+					esc_html__(
265
+						'"%1$s" is not a valid loader method on EE_Registry.',
266
+						'event_espresso'
267
+					),
268
+					$loader
269
+				)
270
+			);
271
+		}
272
+		$class_name = self::$_instance->getFqnForAlias($class_name);
273
+		if (! isset(self::$_instance->_class_loaders[ $class_name ])) {
274
+			self::$_instance->_class_loaders[ $class_name ] = $loader;
275
+			return true;
276
+		}
277
+		return false;
278
+	}
279
+
280
+
281
+	/**
282
+	 * @return array
283
+	 */
284
+	public function dependency_map()
285
+	{
286
+		return $this->_dependency_map;
287
+	}
288
+
289
+
290
+	/**
291
+	 * returns TRUE if dependency map contains a listing for the provided class name
292
+	 *
293
+	 * @param string $class_name
294
+	 * @return boolean
295
+	 */
296
+	public function has($class_name = '')
297
+	{
298
+		// all legacy models have the same dependencies
299
+		if (strpos($class_name, 'EEM_') === 0) {
300
+			$class_name = 'LEGACY_MODELS';
301
+		}
302
+		return isset($this->_dependency_map[ $class_name ]) ? true : false;
303
+	}
304
+
305
+
306
+	/**
307
+	 * returns TRUE if dependency map contains a listing for the provided class name AND dependency
308
+	 *
309
+	 * @param string $class_name
310
+	 * @param string $dependency
311
+	 * @return bool
312
+	 */
313
+	public function has_dependency_for_class($class_name = '', $dependency = '')
314
+	{
315
+		// all legacy models have the same dependencies
316
+		if (strpos($class_name, 'EEM_') === 0) {
317
+			$class_name = 'LEGACY_MODELS';
318
+		}
319
+		$dependency = $this->getFqnForAlias($dependency, $class_name);
320
+		return isset($this->_dependency_map[ $class_name ][ $dependency ])
321
+			? true
322
+			: false;
323
+	}
324
+
325
+
326
+	/**
327
+	 * returns loading strategy for whether a previously cached dependency should be loaded or a new instance returned
328
+	 *
329
+	 * @param string $class_name
330
+	 * @param string $dependency
331
+	 * @return int
332
+	 */
333
+	public function loading_strategy_for_class_dependency($class_name = '', $dependency = '')
334
+	{
335
+		// all legacy models have the same dependencies
336
+		if (strpos($class_name, 'EEM_') === 0) {
337
+			$class_name = 'LEGACY_MODELS';
338
+		}
339
+		$dependency = $this->getFqnForAlias($dependency);
340
+		return $this->has_dependency_for_class($class_name, $dependency)
341
+			? $this->_dependency_map[ $class_name ][ $dependency ]
342
+			: EE_Dependency_Map::not_registered;
343
+	}
344
+
345
+
346
+	/**
347
+	 * @param string $class_name
348
+	 * @return string | Closure
349
+	 */
350
+	public function class_loader($class_name)
351
+	{
352
+		// all legacy models use load_model()
353
+		if (strpos($class_name, 'EEM_') === 0) {
354
+			return 'load_model';
355
+		}
356
+		// EE_CPT_*_Strategy classes like EE_CPT_Event_Strategy, EE_CPT_Venue_Strategy, etc
357
+		// perform strpos() first to avoid loading regex every time we load a class
358
+		if (strpos($class_name, 'EE_CPT_') === 0
359
+			&& preg_match('/^EE_CPT_([a-zA-Z]+)_Strategy$/', $class_name)
360
+		) {
361
+			return 'load_core';
362
+		}
363
+		$class_name = $this->getFqnForAlias($class_name);
364
+		return isset($this->_class_loaders[ $class_name ]) ? $this->_class_loaders[ $class_name ] : '';
365
+	}
366
+
367
+
368
+	/**
369
+	 * @return array
370
+	 */
371
+	public function class_loaders()
372
+	{
373
+		return $this->_class_loaders;
374
+	}
375
+
376
+
377
+	/**
378
+	 * adds an alias for a classname
379
+	 *
380
+	 * @param string $fqcn      the class name that should be used (concrete class to replace interface)
381
+	 * @param string $alias     the class name that would be type hinted for (abstract parent or interface)
382
+	 * @param string $for_class the class that has the dependency (is type hinting for the interface)
383
+	 */
384
+	public function add_alias($fqcn, $alias, $for_class = '')
385
+	{
386
+		$this->class_cache->addAlias($fqcn, $alias, $for_class);
387
+	}
388
+
389
+
390
+	/**
391
+	 * Returns TRUE if the provided fully qualified name IS an alias
392
+	 * WHY?
393
+	 * Because if a class is type hinting for a concretion,
394
+	 * then why would we need to find another class to supply it?
395
+	 * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
396
+	 * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
397
+	 * Don't go looking for some substitute.
398
+	 * Whereas if a class is type hinting for an interface...
399
+	 * then we need to find an actual class to use.
400
+	 * So the interface IS the alias for some other FQN,
401
+	 * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
402
+	 * represents some other class.
403
+	 *
404
+	 * @param string $fqn
405
+	 * @param string $for_class
406
+	 * @return bool
407
+	 */
408
+	public function isAlias($fqn = '', $for_class = '')
409
+	{
410
+		return $this->class_cache->isAlias($fqn, $for_class);
411
+	}
412
+
413
+
414
+	/**
415
+	 * Returns a FQN for provided alias if one exists, otherwise returns the original $alias
416
+	 * functions recursively, so that multiple aliases can be used to drill down to a FQN
417
+	 *  for example:
418
+	 *      if the following two entries were added to the _aliases array:
419
+	 *          array(
420
+	 *              'interface_alias'           => 'some\namespace\interface'
421
+	 *              'some\namespace\interface'  => 'some\namespace\classname'
422
+	 *          )
423
+	 *      then one could use EE_Registry::instance()->create( 'interface_alias' )
424
+	 *      to load an instance of 'some\namespace\classname'
425
+	 *
426
+	 * @param string $alias
427
+	 * @param string $for_class
428
+	 * @return string
429
+	 */
430
+	public function getFqnForAlias($alias = '', $for_class = '')
431
+	{
432
+		return (string) $this->class_cache->getFqnForAlias($alias, $for_class);
433
+	}
434
+
435
+
436
+	/**
437
+	 * Registers the core dependencies and whether a previously instantiated object should be loaded from the cache,
438
+	 * if one exists, or whether a new object should be generated every time the requested class is loaded.
439
+	 * This is done by using the following class constants:
440
+	 *        EE_Dependency_Map::load_from_cache - loads previously instantiated object
441
+	 *        EE_Dependency_Map::load_new_object - generates a new object every time
442
+	 */
443
+	protected function _register_core_dependencies()
444
+	{
445
+		$this->_dependency_map = array(
446
+			'EE_Request_Handler'                                                                                          => array(
447
+				'EE_Request' => EE_Dependency_Map::load_from_cache,
448
+			),
449
+			'EE_System'                                                                                                   => array(
450
+				'EE_Registry'                                 => EE_Dependency_Map::load_from_cache,
451
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
452
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
453
+				'EE_Maintenance_Mode'                         => EE_Dependency_Map::load_from_cache,
454
+			),
455
+			'EE_Session'                                                                                                  => array(
456
+				'EventEspresso\core\services\cache\TransientCacheStorage'  => EE_Dependency_Map::load_from_cache,
457
+				'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
458
+				'EventEspresso\core\services\request\Request'              => EE_Dependency_Map::load_from_cache,
459
+				'EventEspresso\core\services\session\SessionStartHandler'  => EE_Dependency_Map::load_from_cache,
460
+				'EE_Encryption'                                            => EE_Dependency_Map::load_from_cache,
461
+			),
462
+			'EE_Cart'                                                                                                     => array(
463
+				'EE_Session' => EE_Dependency_Map::load_from_cache,
464
+			),
465
+			'EE_Front_Controller'                                                                                         => array(
466
+				'EE_Registry'              => EE_Dependency_Map::load_from_cache,
467
+				'EE_Request_Handler'       => EE_Dependency_Map::load_from_cache,
468
+				'EE_Module_Request_Router' => EE_Dependency_Map::load_from_cache,
469
+			),
470
+			'EE_Messenger_Collection_Loader'                                                                              => array(
471
+				'EE_Messenger_Collection' => EE_Dependency_Map::load_new_object,
472
+			),
473
+			'EE_Message_Type_Collection_Loader'                                                                           => array(
474
+				'EE_Message_Type_Collection' => EE_Dependency_Map::load_new_object,
475
+			),
476
+			'EE_Message_Resource_Manager'                                                                                 => array(
477
+				'EE_Messenger_Collection_Loader'    => EE_Dependency_Map::load_new_object,
478
+				'EE_Message_Type_Collection_Loader' => EE_Dependency_Map::load_new_object,
479
+				'EEM_Message_Template_Group'        => EE_Dependency_Map::load_from_cache,
480
+			),
481
+			'EE_Message_Factory'                                                                                          => array(
482
+				'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
483
+			),
484
+			'EE_messages'                                                                                                 => array(
485
+				'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
486
+			),
487
+			'EE_Messages_Generator'                                                                                       => array(
488
+				'EE_Messages_Queue'                    => EE_Dependency_Map::load_new_object,
489
+				'EE_Messages_Data_Handler_Collection'  => EE_Dependency_Map::load_new_object,
490
+				'EE_Message_Template_Group_Collection' => EE_Dependency_Map::load_new_object,
491
+				'EEH_Parse_Shortcodes'                 => EE_Dependency_Map::load_from_cache,
492
+			),
493
+			'EE_Messages_Processor'                                                                                       => array(
494
+				'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
495
+			),
496
+			'EE_Messages_Queue'                                                                                           => array(
497
+				'EE_Message_Repository' => EE_Dependency_Map::load_new_object,
498
+			),
499
+			'EE_Messages_Template_Defaults'                                                                               => array(
500
+				'EEM_Message_Template_Group' => EE_Dependency_Map::load_from_cache,
501
+				'EEM_Message_Template'       => EE_Dependency_Map::load_from_cache,
502
+			),
503
+			'EE_Message_To_Generate_From_Request'                                                                         => array(
504
+				'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
505
+				'EE_Request_Handler'          => EE_Dependency_Map::load_from_cache,
506
+			),
507
+			'EventEspresso\core\services\commands\CommandBus'                                                             => array(
508
+				'EventEspresso\core\services\commands\CommandHandlerManager' => EE_Dependency_Map::load_from_cache,
509
+			),
510
+			'EventEspresso\services\commands\CommandHandler'                                                              => array(
511
+				'EE_Registry'         => EE_Dependency_Map::load_from_cache,
512
+				'CommandBusInterface' => EE_Dependency_Map::load_from_cache,
513
+			),
514
+			'EventEspresso\core\services\commands\CommandHandlerManager'                                                  => array(
515
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
516
+			),
517
+			'EventEspresso\core\services\commands\CompositeCommandHandler'                                                => array(
518
+				'EventEspresso\core\services\commands\CommandBus'     => EE_Dependency_Map::load_from_cache,
519
+				'EventEspresso\core\services\commands\CommandFactory' => EE_Dependency_Map::load_from_cache,
520
+			),
521
+			'EventEspresso\core\services\commands\CommandFactory'                                                         => array(
522
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
523
+			),
524
+			'EventEspresso\core\services\commands\middleware\CapChecker'                                                  => array(
525
+				'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
526
+			),
527
+			'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker'                                         => array(
528
+				'EE_Capabilities' => EE_Dependency_Map::load_from_cache,
529
+			),
530
+			'EventEspresso\core\domain\services\capabilities\RegistrationsCapChecker'                                     => array(
531
+				'EE_Capabilities' => EE_Dependency_Map::load_from_cache,
532
+			),
533
+			'EventEspresso\core\services\commands\registration\CreateRegistrationCommandHandler'                          => array(
534
+				'EventEspresso\core\domain\services\registration\CreateRegistrationService' => EE_Dependency_Map::load_from_cache,
535
+			),
536
+			'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommandHandler'                     => array(
537
+				'EventEspresso\core\domain\services\registration\CopyRegistrationService' => EE_Dependency_Map::load_from_cache,
538
+			),
539
+			'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommandHandler'                    => array(
540
+				'EventEspresso\core\domain\services\registration\CopyRegistrationService' => EE_Dependency_Map::load_from_cache,
541
+			),
542
+			'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler'         => array(
543
+				'EventEspresso\core\domain\services\registration\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
544
+			),
545
+			'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler' => array(
546
+				'EventEspresso\core\domain\services\registration\UpdateRegistrationService' => EE_Dependency_Map::load_from_cache,
547
+			),
548
+			'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommandHandler'                              => array(
549
+				'EventEspresso\core\domain\services\ticket\CreateTicketLineItemService' => EE_Dependency_Map::load_from_cache,
550
+			),
551
+			'EventEspresso\core\services\commands\ticket\CancelTicketLineItemCommandHandler'                              => array(
552
+				'EventEspresso\core\domain\services\ticket\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
553
+			),
554
+			'EventEspresso\core\domain\services\registration\CancelRegistrationService'                                   => array(
555
+				'EventEspresso\core\domain\services\ticket\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
556
+			),
557
+			'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler'                                  => array(
558
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
559
+			),
560
+			'EventEspresso\core\services\database\TableManager'                                                           => array(
561
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
562
+			),
563
+			'EE_Data_Migration_Class_Base'                                                                                => array(
564
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
565
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
566
+			),
567
+			'EE_DMS_Core_4_1_0'                                                                                           => array(
568
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
569
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
570
+			),
571
+			'EE_DMS_Core_4_2_0'                                                                                           => array(
572
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
573
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
574
+			),
575
+			'EE_DMS_Core_4_3_0'                                                                                           => array(
576
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
577
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
578
+			),
579
+			'EE_DMS_Core_4_4_0'                                                                                           => array(
580
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
581
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
582
+			),
583
+			'EE_DMS_Core_4_5_0'                                                                                           => array(
584
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
585
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
586
+			),
587
+			'EE_DMS_Core_4_6_0'                                                                                           => array(
588
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
589
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
590
+			),
591
+			'EE_DMS_Core_4_7_0'                                                                                           => array(
592
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
593
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
594
+			),
595
+			'EE_DMS_Core_4_8_0'                                                                                           => array(
596
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
597
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
598
+			),
599
+			'EE_DMS_Core_4_9_0'                                                                                           => array(
600
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
601
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
602
+			),
603
+			'EventEspresso\core\services\assets\I18nRegistry'                                                             => array(
604
+				array(),
605
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
606
+			),
607
+			'EventEspresso\core\services\assets\Registry'                                                                 => array(
608
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
609
+				'EventEspresso\core\services\assets\I18nRegistry'    => EE_Dependency_Map::load_from_cache,
610
+			),
611
+			'EventEspresso\core\domain\entities\shortcodes\EspressoCancelled'                                             => array(
612
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
613
+			),
614
+			'EventEspresso\core\domain\entities\shortcodes\EspressoCheckout'                                              => array(
615
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
616
+			),
617
+			'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees'                                        => array(
618
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
619
+			),
620
+			'EventEspresso\core\domain\entities\shortcodes\EspressoEvents'                                                => array(
621
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
622
+			),
623
+			'EventEspresso\core\domain\entities\shortcodes\EspressoThankYou'                                              => array(
624
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
625
+			),
626
+			'EventEspresso\core\domain\entities\shortcodes\EspressoTicketSelector'                                        => array(
627
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
628
+			),
629
+			'EventEspresso\core\domain\entities\shortcodes\EspressoTxnPage'                                               => array(
630
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
631
+			),
632
+			'EventEspresso\core\services\cache\BasicCacheManager'                                                         => array(
633
+				'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
634
+			),
635
+			'EventEspresso\core\services\cache\PostRelatedCacheManager'                                                   => array(
636
+				'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
637
+			),
638
+			'EventEspresso\core\domain\services\validation\email\EmailValidationService'                                  => array(
639
+				'EE_Registration_Config'                     => EE_Dependency_Map::load_from_cache,
640
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
641
+			),
642
+			'EventEspresso\core\domain\values\EmailAddress'                                                               => array(
643
+				null,
644
+				'EventEspresso\core\domain\services\validation\email\EmailValidationService' => EE_Dependency_Map::load_from_cache,
645
+			),
646
+			'EventEspresso\core\services\orm\ModelFieldFactory'                                                           => array(
647
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
648
+			),
649
+			'LEGACY_MODELS'                                                                                               => array(
650
+				null,
651
+				'EventEspresso\core\services\database\ModelFieldFactory' => EE_Dependency_Map::load_from_cache,
652
+			),
653
+			'EE_Module_Request_Router'                                                                                    => array(
654
+				'EE_Request' => EE_Dependency_Map::load_from_cache,
655
+			),
656
+			'EE_Registration_Processor'                                                                                   => array(
657
+				'EE_Request' => EE_Dependency_Map::load_from_cache,
658
+			),
659
+			'EventEspresso\core\services\notifications\PersistentAdminNoticeManager'                                      => array(
660
+				null,
661
+				'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
662
+				'EventEspresso\core\services\request\Request'                         => EE_Dependency_Map::load_from_cache,
663
+			),
664
+			'EventEspresso\core\services\licensing\LicenseService'                                                        => array(
665
+				'EventEspresso\core\domain\services\pue\Stats'  => EE_Dependency_Map::load_from_cache,
666
+				'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache,
667
+			),
668
+			'EE_Admin_Transactions_List_Table'                                                                            => array(
669
+				null,
670
+				'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
671
+			),
672
+			'EventEspresso\core\domain\services\pue\Stats'                                                                => array(
673
+				'EventEspresso\core\domain\services\pue\Config'        => EE_Dependency_Map::load_from_cache,
674
+				'EE_Maintenance_Mode'                                  => EE_Dependency_Map::load_from_cache,
675
+				'EventEspresso\core\domain\services\pue\StatsGatherer' => EE_Dependency_Map::load_from_cache,
676
+			),
677
+			'EventEspresso\core\domain\services\pue\Config'                                                               => array(
678
+				'EE_Network_Config' => EE_Dependency_Map::load_from_cache,
679
+				'EE_Config'         => EE_Dependency_Map::load_from_cache,
680
+			),
681
+			'EventEspresso\core\domain\services\pue\StatsGatherer'                                                        => array(
682
+				'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
683
+				'EEM_Event'          => EE_Dependency_Map::load_from_cache,
684
+				'EEM_Datetime'       => EE_Dependency_Map::load_from_cache,
685
+				'EEM_Ticket'         => EE_Dependency_Map::load_from_cache,
686
+				'EEM_Registration'   => EE_Dependency_Map::load_from_cache,
687
+				'EEM_Transaction'    => EE_Dependency_Map::load_from_cache,
688
+				'EE_Config'          => EE_Dependency_Map::load_from_cache,
689
+			),
690
+			'EventEspresso\core\domain\services\admin\ExitModal'                                                          => array(
691
+				'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache,
692
+			),
693
+			'EventEspresso\core\domain\services\admin\PluginUpsells'                                                      => array(
694
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
695
+			),
696
+			'EventEspresso\caffeinated\modules\recaptcha_invisible\InvisibleRecaptcha'                                    => array(
697
+				'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
698
+				'EE_Session'             => EE_Dependency_Map::load_from_cache,
699
+			),
700
+			'EventEspresso\caffeinated\modules\recaptcha_invisible\RecaptchaAdminSettings'                                => array(
701
+				'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
702
+			),
703
+			'EventEspresso\modules\ticket_selector\ProcessTicketSelector'                                                 => array(
704
+				'EE_Core_Config'                                                          => EE_Dependency_Map::load_from_cache,
705
+				'EventEspresso\core\services\request\Request'                             => EE_Dependency_Map::load_from_cache,
706
+				'EE_Session'                                                              => EE_Dependency_Map::load_from_cache,
707
+				'EEM_Ticket'                                                              => EE_Dependency_Map::load_from_cache,
708
+				'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker' => EE_Dependency_Map::load_from_cache,
709
+			),
710
+			'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker'                                     => array(
711
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
712
+			),
713
+			'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'                              => array(
714
+				'EE_Core_Config'                             => EE_Dependency_Map::load_from_cache,
715
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
716
+			),
717
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes'                                => array(
718
+				'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
719
+			),
720
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomies'                               => array(
721
+				'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
722
+			),
723
+			'EE_CPT_Strategy'                                                                                             => array(
724
+				'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
725
+				'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
726
+			),
727
+			'EventEspresso\core\services\loaders\ObjectIdentifier'                                                        => array(
728
+				'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
729
+			),
730
+			'EventEspresso\core\domain\services\assets\CoreAssetManager'                                                  => array(
731
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
732
+				'EE_Currency_Config'                                 => EE_Dependency_Map::load_from_cache,
733
+				'EE_Template_Config'                                 => EE_Dependency_Map::load_from_cache,
734
+				'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
735
+				'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
736
+			),
737
+			'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy' => array(
738
+				'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
739
+				'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache
740
+			),
741
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee' => array(
742
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
743
+			),
744
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData' => array(
745
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
746
+				'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache
747
+			),
748
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins' => array(
749
+				'EEM_Checkin' => EE_Dependency_Map::load_from_cache,
750
+			),
751
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration' => array(
752
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache,
753
+			),
754
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction' => array(
755
+				'EEM_Transaction' => EE_Dependency_Map::load_from_cache,
756
+			),
757
+			'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData' => array(
758
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
759
+			),
760
+			'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers' => array(
761
+				'EEM_Answer' => EE_Dependency_Map::load_from_cache,
762
+				'EEM_Question' => EE_Dependency_Map::load_from_cache,
763
+			),
764
+			'EventEspresso\core\CPTs\CptQueryModifier' => array(
765
+				null,
766
+				null,
767
+				null,
768
+				'EE_Request_Handler'                          => EE_Dependency_Map::load_from_cache,
769
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
770
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
771
+			),
772
+			'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler' => array(
773
+				'EE_Registry' => EE_Dependency_Map::load_from_cache,
774
+				'EE_Config' => EE_Dependency_Map::load_from_cache
775
+			),
776
+			'EventEspresso\core\services\editor\BlockRegistrationManager'                                                 => array(
777
+				'EventEspresso\core\services\assets\BlockAssetManagerCollection' => EE_Dependency_Map::load_from_cache,
778
+				'EventEspresso\core\domain\entities\editor\BlockCollection'      => EE_Dependency_Map::load_from_cache,
779
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => EE_Dependency_Map::load_from_cache,
780
+				'EventEspresso\core\services\request\Request'                    => EE_Dependency_Map::load_from_cache,
781
+			),
782
+			'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => array(
783
+				'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
784
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
785
+				'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
786
+			),
787
+			'EventEspresso\core\domain\entities\editor\blocks\EventAttendees' => array(
788
+				'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => self::load_from_cache,
789
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
790
+				'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees' => self::load_from_cache,
791
+			),
792
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => array(
793
+				'EventEspresso\core\services\container\Mirror' => EE_Dependency_Map::load_from_cache,
794
+				'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
795
+				'EE_Dependency_Map' => EE_Dependency_Map::load_from_cache,
796
+			),
797
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' => array(
798
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => EE_Dependency_Map::load_from_cache,
799
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
800
+			),
801
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => array(
802
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationCollection' => EE_Dependency_Map::load_from_cache,
803
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' => EE_Dependency_Map::load_from_cache,
804
+			),
805
+			'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => array(
806
+				'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache
807
+			),
808
+			'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => array(
809
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
810
+			),
811
+			'EventEspresso\core\libraries\rest_api\controllers\model\Read' => array(
812
+				'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache
813
+			),
814
+			'EventEspresso\core\libraries\rest_api\calculations\Datetime' => array(
815
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
816
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache
817
+			),
818
+			'EventEspresso\core\libraries\rest_api\calculations\Event' => array(
819
+				'EEM_Event' => EE_Dependency_Map::load_from_cache,
820
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache
821
+			),
822
+			'EventEspresso\core\libraries\rest_api\calculations\Registration' => array(
823
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache
824
+			),
825
+			'EventEspresso\core\services\session\SessionStartHandler' => array(
826
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
827
+			),
828
+			'EE_URL_Validation_Strategy' => array(
829
+				null,
830
+				null,
831
+				'EventEspresso\core\services\validators\URLValidator' => EE_Dependency_Map::load_from_cache
832
+			),
833
+		);
834
+	}
835
+
836
+
837
+	/**
838
+	 * Registers how core classes are loaded.
839
+	 * This can either be done by simply providing the name of one of the EE_Registry loader methods such as:
840
+	 *        'EE_Request_Handler' => 'load_core'
841
+	 *        'EE_Messages_Queue'  => 'load_lib'
842
+	 *        'EEH_Debug_Tools'    => 'load_helper'
843
+	 * or, if greater control is required, by providing a custom closure. For example:
844
+	 *        'Some_Class' => function () {
845
+	 *            return new Some_Class();
846
+	 *        },
847
+	 * This is required for instantiating dependencies
848
+	 * where an interface has been type hinted in a class constructor. For example:
849
+	 *        'Required_Interface' => function () {
850
+	 *            return new A_Class_That_Implements_Required_Interface();
851
+	 *        },
852
+	 */
853
+	protected function _register_core_class_loaders()
854
+	{
855
+		$this->_class_loaders = array(
856
+			// load_core
857
+			'EE_Dependency_Map'                            => function () {
858
+				return $this;
859
+			},
860
+			'EE_Capabilities'                              => 'load_core',
861
+			'EE_Encryption'                                => 'load_core',
862
+			'EE_Front_Controller'                          => 'load_core',
863
+			'EE_Module_Request_Router'                     => 'load_core',
864
+			'EE_Registry'                                  => 'load_core',
865
+			'EE_Request'                                   => function () {
866
+				return $this->legacy_request;
867
+			},
868
+			'EventEspresso\core\services\request\Request'  => function () {
869
+				return $this->request;
870
+			},
871
+			'EventEspresso\core\services\request\Response' => function () {
872
+				return $this->response;
873
+			},
874
+			'EE_Base'                                      => 'load_core',
875
+			'EE_Request_Handler'                           => 'load_core',
876
+			'EE_Session'                                   => 'load_core',
877
+			'EE_Cron_Tasks'                                => 'load_core',
878
+			'EE_System'                                    => 'load_core',
879
+			'EE_Maintenance_Mode'                          => 'load_core',
880
+			'EE_Register_CPTs'                             => 'load_core',
881
+			'EE_Admin'                                     => 'load_core',
882
+			'EE_CPT_Strategy'                              => 'load_core',
883
+			// load_lib
884
+			'EE_Message_Resource_Manager'                  => 'load_lib',
885
+			'EE_Message_Type_Collection'                   => 'load_lib',
886
+			'EE_Message_Type_Collection_Loader'            => 'load_lib',
887
+			'EE_Messenger_Collection'                      => 'load_lib',
888
+			'EE_Messenger_Collection_Loader'               => 'load_lib',
889
+			'EE_Messages_Processor'                        => 'load_lib',
890
+			'EE_Message_Repository'                        => 'load_lib',
891
+			'EE_Messages_Queue'                            => 'load_lib',
892
+			'EE_Messages_Data_Handler_Collection'          => 'load_lib',
893
+			'EE_Message_Template_Group_Collection'         => 'load_lib',
894
+			'EE_Payment_Method_Manager'                    => 'load_lib',
895
+			'EE_Messages_Generator'                        => function () {
896
+				return EE_Registry::instance()->load_lib(
897
+					'Messages_Generator',
898
+					array(),
899
+					false,
900
+					false
901
+				);
902
+			},
903
+			'EE_Messages_Template_Defaults'                => function ($arguments = array()) {
904
+				return EE_Registry::instance()->load_lib(
905
+					'Messages_Template_Defaults',
906
+					$arguments,
907
+					false,
908
+					false
909
+				);
910
+			},
911
+			// load_helper
912
+			'EEH_Parse_Shortcodes'                         => function () {
913
+				if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
914
+					return new EEH_Parse_Shortcodes();
915
+				}
916
+				return null;
917
+			},
918
+			'EE_Template_Config'                           => function () {
919
+				return EE_Config::instance()->template_settings;
920
+			},
921
+			'EE_Currency_Config'                           => function () {
922
+				return EE_Config::instance()->currency;
923
+			},
924
+			'EE_Registration_Config'                       => function () {
925
+				return EE_Config::instance()->registration;
926
+			},
927
+			'EE_Core_Config'                               => function () {
928
+				return EE_Config::instance()->core;
929
+			},
930
+			'EventEspresso\core\services\loaders\Loader'   => function () {
931
+				return LoaderFactory::getLoader();
932
+			},
933
+			'EE_Network_Config'                            => function () {
934
+				return EE_Network_Config::instance();
935
+			},
936
+			'EE_Config'                                    => function () {
937
+				return EE_Config::instance();
938
+			},
939
+			'EventEspresso\core\domain\Domain'             => function () {
940
+				return DomainFactory::getEventEspressoCoreDomain();
941
+			},
942
+			'EE_Admin_Config'                              => function () {
943
+				return EE_Config::instance()->admin;
944
+			},
945
+		);
946
+	}
947
+
948
+
949
+	/**
950
+	 * can be used for supplying alternate names for classes,
951
+	 * or for connecting interface names to instantiable classes
952
+	 */
953
+	protected function _register_core_aliases()
954
+	{
955
+		$aliases = array(
956
+			'CommandBusInterface'                                                          => 'EventEspresso\core\services\commands\CommandBusInterface',
957
+			'EventEspresso\core\services\commands\CommandBusInterface'                     => 'EventEspresso\core\services\commands\CommandBus',
958
+			'CommandHandlerManagerInterface'                                               => 'EventEspresso\core\services\commands\CommandHandlerManagerInterface',
959
+			'EventEspresso\core\services\commands\CommandHandlerManagerInterface'          => 'EventEspresso\core\services\commands\CommandHandlerManager',
960
+			'CapChecker'                                                                   => 'EventEspresso\core\services\commands\middleware\CapChecker',
961
+			'AddActionHook'                                                                => 'EventEspresso\core\services\commands\middleware\AddActionHook',
962
+			'CapabilitiesChecker'                                                          => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
963
+			'CapabilitiesCheckerInterface'                                                 => 'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface',
964
+			'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface' => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
965
+			'CreateRegistrationService'                                                    => 'EventEspresso\core\domain\services\registration\CreateRegistrationService',
966
+			'CreateRegistrationCommandHandler'                                             => 'EventEspresso\core\services\commands\registration\CreateRegistrationCommand',
967
+			'CopyRegistrationDetailsCommandHandler'                                        => 'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommand',
968
+			'CopyRegistrationPaymentsCommandHandler'                                       => 'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommand',
969
+			'CancelRegistrationAndTicketLineItemCommandHandler'                            => 'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler',
970
+			'UpdateRegistrationAndTransactionAfterChangeCommandHandler'                    => 'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler',
971
+			'CreateTicketLineItemCommandHandler'                                           => 'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommand',
972
+			'CreateTransactionCommandHandler'                                              => 'EventEspresso\core\services\commands\transaction\CreateTransactionCommandHandler',
973
+			'CreateAttendeeCommandHandler'                                                 => 'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler',
974
+			'TableManager'                                                                 => 'EventEspresso\core\services\database\TableManager',
975
+			'TableAnalysis'                                                                => 'EventEspresso\core\services\database\TableAnalysis',
976
+			'EspressoShortcode'                                                            => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
977
+			'ShortcodeInterface'                                                           => 'EventEspresso\core\services\shortcodes\ShortcodeInterface',
978
+			'EventEspresso\core\services\shortcodes\ShortcodeInterface'                    => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
979
+			'EventEspresso\core\services\cache\CacheStorageInterface'                      => 'EventEspresso\core\services\cache\TransientCacheStorage',
980
+			'LoaderInterface'                                                              => 'EventEspresso\core\services\loaders\LoaderInterface',
981
+			'EventEspresso\core\services\loaders\LoaderInterface'                          => 'EventEspresso\core\services\loaders\Loader',
982
+			'CommandFactoryInterface'                                                      => 'EventEspresso\core\services\commands\CommandFactoryInterface',
983
+			'EventEspresso\core\services\commands\CommandFactoryInterface'                 => 'EventEspresso\core\services\commands\CommandFactory',
984
+			'EmailValidatorInterface'                                                      => 'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface',
985
+			'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface'  => 'EventEspresso\core\domain\services\validation\email\EmailValidationService',
986
+			'NoticeConverterInterface'                                                     => 'EventEspresso\core\services\notices\NoticeConverterInterface',
987
+			'EventEspresso\core\services\notices\NoticeConverterInterface'                 => 'EventEspresso\core\services\notices\ConvertNoticesToEeErrors',
988
+			'NoticesContainerInterface'                                                    => 'EventEspresso\core\services\notices\NoticesContainerInterface',
989
+			'EventEspresso\core\services\notices\NoticesContainerInterface'                => 'EventEspresso\core\services\notices\NoticesContainer',
990
+			'EventEspresso\core\services\request\RequestInterface'                         => 'EventEspresso\core\services\request\Request',
991
+			'EventEspresso\core\services\request\ResponseInterface'                        => 'EventEspresso\core\services\request\Response',
992
+			'EventEspresso\core\domain\DomainInterface'                                    => 'EventEspresso\core\domain\Domain',
993
+		);
994
+		foreach ($aliases as $alias => $fqn) {
995
+			if (is_array($fqn)) {
996
+				foreach ($fqn as $class => $for_class) {
997
+					$this->class_cache->addAlias($class, $alias, $for_class);
998
+				}
999
+				continue;
1000
+			}
1001
+			$this->class_cache->addAlias($fqn, $alias);
1002
+		}
1003
+		if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
1004
+			$this->class_cache->addAlias(
1005
+				'EventEspresso\core\services\notices\ConvertNoticesToAdminNotices',
1006
+				'EventEspresso\core\services\notices\NoticeConverterInterface'
1007
+			);
1008
+		}
1009
+	}
1010
+
1011
+
1012
+	/**
1013
+	 * This is used to reset the internal map and class_loaders to their original default state at the beginning of the
1014
+	 * request Primarily used by unit tests.
1015
+	 */
1016
+	public function reset()
1017
+	{
1018
+		$this->_register_core_class_loaders();
1019
+		$this->_register_core_dependencies();
1020
+	}
1021
+
1022
+
1023
+	/**
1024
+	 * PLZ NOTE: a better name for this method would be is_alias()
1025
+	 * because it returns TRUE if the provided fully qualified name IS an alias
1026
+	 * WHY?
1027
+	 * Because if a class is type hinting for a concretion,
1028
+	 * then why would we need to find another class to supply it?
1029
+	 * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
1030
+	 * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
1031
+	 * Don't go looking for some substitute.
1032
+	 * Whereas if a class is type hinting for an interface...
1033
+	 * then we need to find an actual class to use.
1034
+	 * So the interface IS the alias for some other FQN,
1035
+	 * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
1036
+	 * represents some other class.
1037
+	 *
1038
+	 * @deprecated 4.9.62.p
1039
+	 * @param string $fqn
1040
+	 * @param string $for_class
1041
+	 * @return bool
1042
+	 */
1043
+	public function has_alias($fqn = '', $for_class = '')
1044
+	{
1045
+		return $this->isAlias($fqn, $for_class);
1046
+	}
1047
+
1048
+
1049
+	/**
1050
+	 * PLZ NOTE: a better name for this method would be get_fqn_for_alias()
1051
+	 * because it returns a FQN for provided alias if one exists, otherwise returns the original $alias
1052
+	 * functions recursively, so that multiple aliases can be used to drill down to a FQN
1053
+	 *  for example:
1054
+	 *      if the following two entries were added to the _aliases array:
1055
+	 *          array(
1056
+	 *              'interface_alias'           => 'some\namespace\interface'
1057
+	 *              'some\namespace\interface'  => 'some\namespace\classname'
1058
+	 *          )
1059
+	 *      then one could use EE_Registry::instance()->create( 'interface_alias' )
1060
+	 *      to load an instance of 'some\namespace\classname'
1061
+	 *
1062
+	 * @deprecated 4.9.62.p
1063
+	 * @param string $alias
1064
+	 * @param string $for_class
1065
+	 * @return string
1066
+	 */
1067
+	public function get_alias($alias = '', $for_class = '')
1068
+	{
1069
+		return $this->getFqnForAlias($alias, $for_class);
1070
+	}
1071 1071
 }
Please login to merge, or discard this patch.