Completed
Branch master (f3e12f)
by
unknown
02:11
created
core/EE_Dependency_Map.core.php 1 patch
Indentation   +1171 added lines, -1171 removed lines patch added patch discarded remove patch
@@ -20,1175 +20,1175 @@
 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 = [];
87
-
88
-    /**
89
-     * @type array $_class_loaders
90
-     */
91
-    protected $_class_loaders = [];
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 (
126
-            ! self::$_instance instanceof EE_Dependency_Map
127
-            && $class_cache instanceof ClassInterfaceCache
128
-        ) {
129
-            self::$_instance = new EE_Dependency_Map($class_cache);
130
-        }
131
-        return self::$_instance;
132
-    }
133
-
134
-
135
-    /**
136
-     * @param RequestInterface $request
137
-     */
138
-    public function setRequest(RequestInterface $request)
139
-    {
140
-        $this->request = $request;
141
-    }
142
-
143
-
144
-    /**
145
-     * @param LegacyRequestInterface $legacy_request
146
-     */
147
-    public function setLegacyRequest(LegacyRequestInterface $legacy_request)
148
-    {
149
-        $this->legacy_request = $legacy_request;
150
-    }
151
-
152
-
153
-    /**
154
-     * @param ResponseInterface $response
155
-     */
156
-    public function setResponse(ResponseInterface $response)
157
-    {
158
-        $this->response = $response;
159
-    }
160
-
161
-
162
-    /**
163
-     * @param LoaderInterface $loader
164
-     */
165
-    public function setLoader(LoaderInterface $loader)
166
-    {
167
-        $this->loader = $loader;
168
-    }
169
-
170
-
171
-    /**
172
-     * @param string $class
173
-     * @param array  $dependencies
174
-     * @param int    $overwrite
175
-     * @return bool
176
-     */
177
-    public static function register_dependencies(
178
-        $class,
179
-        array $dependencies,
180
-        $overwrite = EE_Dependency_Map::KEEP_EXISTING_DEPENDENCIES
181
-    ) {
182
-        return self::$_instance->registerDependencies($class, $dependencies, $overwrite);
183
-    }
184
-
185
-
186
-    /**
187
-     * Assigns an array of class names and corresponding load sources (new or cached)
188
-     * to the class specified by the first parameter.
189
-     * IMPORTANT !!!
190
-     * The order of elements in the incoming $dependencies array MUST match
191
-     * the order of the constructor parameters for the class in question.
192
-     * This is especially important when overriding any existing dependencies that are registered.
193
-     * the third parameter controls whether any duplicate dependencies are overwritten or not.
194
-     *
195
-     * @param string $class
196
-     * @param array  $dependencies
197
-     * @param int    $overwrite
198
-     * @return bool
199
-     */
200
-    public function registerDependencies(
201
-        $class,
202
-        array $dependencies,
203
-        $overwrite = EE_Dependency_Map::KEEP_EXISTING_DEPENDENCIES
204
-    ) {
205
-        $class      = trim($class, '\\');
206
-        $registered = false;
207
-        if (empty(self::$_instance->_dependency_map[ $class ])) {
208
-            self::$_instance->_dependency_map[ $class ] = [];
209
-        }
210
-        // we need to make sure that any aliases used when registering a dependency
211
-        // get resolved to the correct class name
212
-        foreach ($dependencies as $dependency => $load_source) {
213
-            $alias = self::$_instance->getFqnForAlias($dependency);
214
-            if (
215
-                $overwrite === EE_Dependency_Map::OVERWRITE_DEPENDENCIES
216
-                || ! isset(self::$_instance->_dependency_map[ $class ][ $alias ])
217
-            ) {
218
-                unset($dependencies[ $dependency ]);
219
-                $dependencies[ $alias ] = $load_source;
220
-                $registered             = true;
221
-            }
222
-        }
223
-        // now add our two lists of dependencies together.
224
-        // using Union (+=) favours the arrays in precedence from left to right,
225
-        // so $dependencies is NOT overwritten because it is listed first
226
-        // ie: with A = B + C, entries in B take precedence over duplicate entries in C
227
-        // Union is way faster than array_merge() but should be used with caution...
228
-        // especially with numerically indexed arrays
229
-        $dependencies += self::$_instance->_dependency_map[ $class ];
230
-        // now we need to ensure that the resulting dependencies
231
-        // array only has the entries that are required for the class
232
-        // so first count how many dependencies were originally registered for the class
233
-        $dependency_count = count(self::$_instance->_dependency_map[ $class ]);
234
-        // if that count is non-zero (meaning dependencies were already registered)
235
-        self::$_instance->_dependency_map[ $class ] = $dependency_count
236
-            // then truncate the  final array to match that count
237
-            ? array_slice($dependencies, 0, $dependency_count)
238
-            // otherwise just take the incoming array because nothing previously existed
239
-            : $dependencies;
240
-        return $registered;
241
-    }
242
-
243
-
244
-    /**
245
-     * @param string $class_name
246
-     * @param string $loader
247
-     * @param bool   $overwrite
248
-     * @return bool
249
-     * @throws DomainException
250
-     */
251
-    public static function register_class_loader($class_name, $loader = 'load_core', $overwrite = false)
252
-    {
253
-        if (! $loader instanceof Closure && strpos($class_name, '\\') !== false) {
254
-            throw new DomainException(
255
-                esc_html__('Don\'t use class loaders for FQCNs.', 'event_espresso')
256
-            );
257
-        }
258
-        // check that loader is callable or method starts with "load_" and exists in EE_Registry
259
-        if (
260
-            ! is_callable($loader)
261
-            && (
262
-                strpos($loader, 'load_') !== 0
263
-                || ! method_exists('EE_Registry', $loader)
264
-            )
265
-        ) {
266
-            throw new DomainException(
267
-                sprintf(
268
-                    esc_html__(
269
-                        '"%1$s" is not a valid loader method on EE_Registry.',
270
-                        'event_espresso'
271
-                    ),
272
-                    $loader
273
-                )
274
-            );
275
-        }
276
-        $class_name = self::$_instance->getFqnForAlias($class_name);
277
-        if ($overwrite || ! isset(self::$_instance->_class_loaders[ $class_name ])) {
278
-            self::$_instance->_class_loaders[ $class_name ] = $loader;
279
-            return true;
280
-        }
281
-        return false;
282
-    }
283
-
284
-
285
-    /**
286
-     * @return array
287
-     */
288
-    public function dependency_map()
289
-    {
290
-        return $this->_dependency_map;
291
-    }
292
-
293
-
294
-    /**
295
-     * returns TRUE if dependency map contains a listing for the provided class name
296
-     *
297
-     * @param string $class_name
298
-     * @return boolean
299
-     */
300
-    public function has($class_name = '')
301
-    {
302
-        // all legacy models have the same dependencies
303
-        if (strpos($class_name, 'EEM_') === 0) {
304
-            $class_name = 'LEGACY_MODELS';
305
-        }
306
-        return isset($this->_dependency_map[ $class_name ]);
307
-    }
308
-
309
-
310
-    /**
311
-     * returns TRUE if dependency map contains a listing for the provided class name AND dependency
312
-     *
313
-     * @param string $class_name
314
-     * @param string $dependency
315
-     * @return bool
316
-     */
317
-    public function has_dependency_for_class($class_name = '', $dependency = '')
318
-    {
319
-        // all legacy models have the same dependencies
320
-        if (strpos($class_name, 'EEM_') === 0) {
321
-            $class_name = 'LEGACY_MODELS';
322
-        }
323
-        $dependency = $this->getFqnForAlias($dependency, $class_name);
324
-        return isset($this->_dependency_map[ $class_name ][ $dependency ]);
325
-    }
326
-
327
-
328
-    /**
329
-     * returns loading strategy for whether a previously cached dependency should be loaded or a new instance returned
330
-     *
331
-     * @param string $class_name
332
-     * @param string $dependency
333
-     * @return int
334
-     */
335
-    public function loading_strategy_for_class_dependency($class_name = '', $dependency = '')
336
-    {
337
-        // all legacy models have the same dependencies
338
-        if (strpos($class_name, 'EEM_') === 0) {
339
-            $class_name = 'LEGACY_MODELS';
340
-        }
341
-        $dependency = $this->getFqnForAlias($dependency);
342
-        return $this->has_dependency_for_class($class_name, $dependency)
343
-            ? $this->_dependency_map[ $class_name ][ $dependency ]
344
-            : EE_Dependency_Map::not_registered;
345
-    }
346
-
347
-
348
-    /**
349
-     * @param string $class_name
350
-     * @return string | Closure
351
-     */
352
-    public function class_loader($class_name)
353
-    {
354
-        // all legacy models use load_model()
355
-        if (strpos($class_name, 'EEM_') === 0) {
356
-            return 'load_model';
357
-        }
358
-        // EE_CPT_*_Strategy classes like EE_CPT_Event_Strategy, EE_CPT_Venue_Strategy, etc
359
-        // perform strpos() first to avoid loading regex every time we load a class
360
-        if (
361
-            strpos($class_name, 'EE_CPT_') === 0
362
-            && preg_match('/^EE_CPT_([a-zA-Z]+)_Strategy$/', $class_name)
363
-        ) {
364
-            return 'load_core';
365
-        }
366
-        $class_name = $this->getFqnForAlias($class_name);
367
-        return isset($this->_class_loaders[ $class_name ]) ? $this->_class_loaders[ $class_name ] : '';
368
-    }
369
-
370
-
371
-    /**
372
-     * @return array
373
-     */
374
-    public function class_loaders()
375
-    {
376
-        return $this->_class_loaders;
377
-    }
378
-
379
-
380
-    /**
381
-     * adds an alias for a classname
382
-     *
383
-     * @param string $fqcn      the class name that should be used (concrete class to replace interface)
384
-     * @param string $alias     the class name that would be type hinted for (abstract parent or interface)
385
-     * @param string $for_class the class that has the dependency (is type hinting for the interface)
386
-     */
387
-    public function add_alias($fqcn, $alias, $for_class = '')
388
-    {
389
-        $this->class_cache->addAlias($fqcn, $alias, $for_class);
390
-    }
391
-
392
-
393
-    /**
394
-     * Returns TRUE if the provided fully qualified name IS an alias
395
-     * WHY?
396
-     * Because if a class is type hinting for a concretion,
397
-     * then why would we need to find another class to supply it?
398
-     * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
399
-     * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
400
-     * Don't go looking for some substitute.
401
-     * Whereas if a class is type hinting for an interface...
402
-     * then we need to find an actual class to use.
403
-     * So the interface IS the alias for some other FQN,
404
-     * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
405
-     * represents some other class.
406
-     *
407
-     * @param string $fqn
408
-     * @param string $for_class
409
-     * @return bool
410
-     */
411
-    public function isAlias($fqn = '', $for_class = '')
412
-    {
413
-        return $this->class_cache->isAlias($fqn, $for_class);
414
-    }
415
-
416
-
417
-    /**
418
-     * Returns a FQN for provided alias if one exists, otherwise returns the original $alias
419
-     * functions recursively, so that multiple aliases can be used to drill down to a FQN
420
-     *  for example:
421
-     *      if the following two entries were added to the _aliases array:
422
-     *          array(
423
-     *              'interface_alias'           => 'some\namespace\interface'
424
-     *              'some\namespace\interface'  => 'some\namespace\classname'
425
-     *          )
426
-     *      then one could use EE_Registry::instance()->create( 'interface_alias' )
427
-     *      to load an instance of 'some\namespace\classname'
428
-     *
429
-     * @param string $alias
430
-     * @param string $for_class
431
-     * @return string
432
-     */
433
-    public function getFqnForAlias($alias = '', $for_class = '')
434
-    {
435
-        return $this->class_cache->getFqnForAlias($alias, $for_class);
436
-    }
437
-
438
-
439
-    /**
440
-     * Registers the core dependencies and whether a previously instantiated object should be loaded from the cache,
441
-     * if one exists, or whether a new object should be generated every time the requested class is loaded.
442
-     * This is done by using the following class constants:
443
-     *        EE_Dependency_Map::load_from_cache - loads previously instantiated object
444
-     *        EE_Dependency_Map::load_new_object - generates a new object every time
445
-     */
446
-    protected function _register_core_dependencies()
447
-    {
448
-        $this->_dependency_map = [
449
-            'EE_Admin'                                                                                          => [
450
-                'EventEspresso\core\services\request\Request'     => EE_Dependency_Map::load_from_cache,
451
-            ],
452
-            'EE_Request_Handler'                                                                                          => [
453
-                'EventEspresso\core\services\request\Request'     => EE_Dependency_Map::load_from_cache,
454
-                'EventEspresso\core\services\request\Response'    => EE_Dependency_Map::load_from_cache,
455
-            ],
456
-            'EE_System'                                                                                                   => [
457
-                'EE_Registry'                                 => EE_Dependency_Map::load_from_cache,
458
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
459
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
460
-                'EE_Maintenance_Mode'                         => EE_Dependency_Map::load_from_cache,
461
-            ],
462
-            'EE_Session'                                                                                                  => [
463
-                'EventEspresso\core\services\cache\TransientCacheStorage'  => EE_Dependency_Map::load_from_cache,
464
-                'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
465
-                'EventEspresso\core\services\request\Request'              => EE_Dependency_Map::load_from_cache,
466
-                'EventEspresso\core\services\session\SessionStartHandler'  => EE_Dependency_Map::load_from_cache,
467
-                'EE_Encryption'                                            => EE_Dependency_Map::load_from_cache,
468
-            ],
469
-            'EE_Cart'                                                                                                     => [
470
-                'EE_Session' => EE_Dependency_Map::load_from_cache,
471
-            ],
472
-            'EE_Front_Controller'                                                                                         => [
473
-                'EE_Registry'                                     => EE_Dependency_Map::load_from_cache,
474
-                'EventEspresso\core\services\request\CurrentPage' => EE_Dependency_Map::load_from_cache,
475
-                'EE_Module_Request_Router'                        => EE_Dependency_Map::load_from_cache,
476
-            ],
477
-            'EE_Messenger_Collection_Loader'                                                                              => [
478
-                'EE_Messenger_Collection' => EE_Dependency_Map::load_new_object,
479
-            ],
480
-            'EE_Message_Type_Collection_Loader'                                                                           => [
481
-                'EE_Message_Type_Collection' => EE_Dependency_Map::load_new_object,
482
-            ],
483
-            'EE_Message_Resource_Manager'                                                                                 => [
484
-                'EE_Messenger_Collection_Loader'    => EE_Dependency_Map::load_new_object,
485
-                'EE_Message_Type_Collection_Loader' => EE_Dependency_Map::load_new_object,
486
-                'EEM_Message_Template_Group'        => EE_Dependency_Map::load_from_cache,
487
-            ],
488
-            'EE_Message_Factory'                                                                                          => [
489
-                'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
490
-            ],
491
-            'EE_messages'                                                                                                 => [
492
-                'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
493
-            ],
494
-            'EE_Messages_Generator'                                                                                       => [
495
-                'EE_Messages_Queue'                    => EE_Dependency_Map::load_new_object,
496
-                'EE_Messages_Data_Handler_Collection'  => EE_Dependency_Map::load_new_object,
497
-                'EE_Message_Template_Group_Collection' => EE_Dependency_Map::load_new_object,
498
-                'EEH_Parse_Shortcodes'                 => EE_Dependency_Map::load_from_cache,
499
-            ],
500
-            'EE_Messages_Processor'                                                                                       => [
501
-                'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
502
-            ],
503
-            'EE_Messages_Queue'                                                                                           => [
504
-                'EE_Message_Repository' => EE_Dependency_Map::load_new_object,
505
-            ],
506
-            'EE_Messages_Template_Defaults'                                                                               => [
507
-                'EEM_Message_Template_Group' => EE_Dependency_Map::load_from_cache,
508
-                'EEM_Message_Template'       => EE_Dependency_Map::load_from_cache,
509
-            ],
510
-            'EE_Message_To_Generate_From_Request'                                                                         => [
511
-                'EE_Message_Resource_Manager'                 => EE_Dependency_Map::load_from_cache,
512
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
513
-            ],
514
-            'EventEspresso\core\services\commands\CommandBus'                                                             => [
515
-                'EventEspresso\core\services\commands\CommandHandlerManager' => EE_Dependency_Map::load_from_cache,
516
-            ],
517
-            'EventEspresso\services\commands\CommandHandler'                                                              => [
518
-                'EE_Registry'         => EE_Dependency_Map::load_from_cache,
519
-                'CommandBusInterface' => EE_Dependency_Map::load_from_cache,
520
-            ],
521
-            'EventEspresso\core\services\commands\CommandHandlerManager'                                                  => [
522
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
523
-            ],
524
-            'EventEspresso\core\services\commands\CompositeCommandHandler'                                                => [
525
-                'EventEspresso\core\services\commands\CommandBus'     => EE_Dependency_Map::load_from_cache,
526
-                'EventEspresso\core\services\commands\CommandFactory' => EE_Dependency_Map::load_from_cache,
527
-            ],
528
-            'EventEspresso\core\services\commands\CommandFactory'                                                         => [
529
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
530
-            ],
531
-            'EventEspresso\core\services\commands\middleware\CapChecker'                                                  => [
532
-                'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
533
-            ],
534
-            'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker'                                         => [
535
-                'EE_Capabilities' => EE_Dependency_Map::load_from_cache,
536
-            ],
537
-            'EventEspresso\core\domain\services\capabilities\RegistrationsCapChecker'                                     => [
538
-                'EE_Capabilities' => EE_Dependency_Map::load_from_cache,
539
-            ],
540
-            'EventEspresso\core\services\commands\registration\CreateRegistrationCommandHandler'                          => [
541
-                'EventEspresso\core\domain\services\registration\CreateRegistrationService' => EE_Dependency_Map::load_from_cache,
542
-            ],
543
-            'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommandHandler'                     => [
544
-                'EventEspresso\core\domain\services\registration\CopyRegistrationService' => EE_Dependency_Map::load_from_cache,
545
-            ],
546
-            'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommandHandler'                    => [
547
-                'EventEspresso\core\domain\services\registration\CopyRegistrationService' => EE_Dependency_Map::load_from_cache,
548
-            ],
549
-            'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler'         => [
550
-                'EventEspresso\core\domain\services\registration\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
551
-            ],
552
-            'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler' => [
553
-                'EventEspresso\core\domain\services\registration\UpdateRegistrationService' => EE_Dependency_Map::load_from_cache,
554
-            ],
555
-            'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommandHandler'                              => [
556
-                'EventEspresso\core\domain\services\ticket\CreateTicketLineItemService' => EE_Dependency_Map::load_from_cache,
557
-            ],
558
-            'EventEspresso\core\services\commands\ticket\CancelTicketLineItemCommandHandler'                              => [
559
-                'EventEspresso\core\domain\services\ticket\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
560
-            ],
561
-            'EventEspresso\core\domain\services\registration\CancelRegistrationService'                                   => [
562
-                'EventEspresso\core\domain\services\ticket\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
563
-            ],
564
-            'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler'                                  => [
565
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
566
-            ],
567
-            'EventEspresso\core\services\database\TableManager'                                                           => [
568
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
569
-            ],
570
-            'EE_Data_Migration_Class_Base'                                                                                => [
571
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
572
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
573
-            ],
574
-            'EE_DMS_Core_4_1_0'                                                                                           => [
575
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
576
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
577
-            ],
578
-            'EE_DMS_Core_4_2_0'                                                                                           => [
579
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
580
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
581
-            ],
582
-            'EE_DMS_Core_4_3_0'                                                                                           => [
583
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
584
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
585
-            ],
586
-            'EE_DMS_Core_4_4_0'                                                                                           => [
587
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
588
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
589
-            ],
590
-            'EE_DMS_Core_4_5_0'                                                                                           => [
591
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
592
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
593
-            ],
594
-            'EE_DMS_Core_4_6_0'                                                                                           => [
595
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
596
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
597
-            ],
598
-            'EE_DMS_Core_4_7_0'                                                                                           => [
599
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
600
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
601
-            ],
602
-            'EE_DMS_Core_4_8_0'                                                                                           => [
603
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
604
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
605
-            ],
606
-            'EE_DMS_Core_4_9_0'                                                                                           => [
607
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
608
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
609
-            ],
610
-            'EE_DMS_Core_4_10_0'                                                                                          => [
611
-                'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
612
-                'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
613
-                'EE_DMS_Core_4_9_0'                                  => EE_Dependency_Map::load_from_cache,
614
-            ],
615
-            'EventEspresso\core\services\assets\I18nRegistry'                                                             => [
616
-                [],
617
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
618
-            ],
619
-            'EventEspresso\core\services\assets\Registry'                                                                 => [
620
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
621
-                'EventEspresso\core\services\assets\I18nRegistry'    => EE_Dependency_Map::load_from_cache,
622
-            ],
623
-            'EventEspresso\core\domain\entities\shortcodes\EspressoCancelled'                                             => [
624
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
625
-            ],
626
-            'EventEspresso\core\domain\entities\shortcodes\EspressoCheckout'                                              => [
627
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
628
-            ],
629
-            'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees'                                        => [
630
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
631
-            ],
632
-            'EventEspresso\core\domain\entities\shortcodes\EspressoEvents'                                                => [
633
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
634
-            ],
635
-            'EventEspresso\core\domain\entities\shortcodes\EspressoThankYou'                                              => [
636
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
637
-            ],
638
-            'EventEspresso\core\domain\entities\shortcodes\EspressoTicketSelector'                                        => [
639
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
640
-            ],
641
-            'EventEspresso\core\domain\entities\shortcodes\EspressoTxnPage'                                               => [
642
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
643
-            ],
644
-            'EventEspresso\core\services\cache\BasicCacheManager'                                                         => [
645
-                'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
646
-            ],
647
-            'EventEspresso\core\services\cache\PostRelatedCacheManager'                                                   => [
648
-                'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
649
-            ],
650
-            'EventEspresso\core\domain\services\validation\email\EmailValidationService'                                  => [
651
-                'EE_Registration_Config'                     => EE_Dependency_Map::load_from_cache,
652
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
653
-            ],
654
-            'EventEspresso\core\domain\values\EmailAddress'                                                               => [
655
-                null,
656
-                'EventEspresso\core\domain\services\validation\email\EmailValidationService' => EE_Dependency_Map::load_from_cache,
657
-            ],
658
-            'EventEspresso\core\services\orm\ModelFieldFactory'                                                           => [
659
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
660
-            ],
661
-            'LEGACY_MODELS'                                                                                               => [
662
-                null,
663
-                'EventEspresso\core\services\database\ModelFieldFactory' => EE_Dependency_Map::load_from_cache,
664
-            ],
665
-            'EE_Module_Request_Router'                                                                                    => [
666
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
667
-            ],
668
-            'EE_Registration_Processor'                                                                                   => [
669
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
670
-            ],
671
-            'EventEspresso\core\services\notifications\PersistentAdminNoticeManager'                                      => [
672
-                null,
673
-                'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
674
-                'EventEspresso\core\services\request\Request'                         => EE_Dependency_Map::load_from_cache,
675
-            ],
676
-            'EventEspresso\core\services\licensing\LicenseService'                                                        => [
677
-                'EventEspresso\core\domain\services\pue\Stats'  => EE_Dependency_Map::load_from_cache,
678
-                'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache,
679
-            ],
680
-            'EE_Admin_Transactions_List_Table'                                                                            => [
681
-                null,
682
-                'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
683
-            ],
684
-            'EventEspresso\core\domain\services\pue\Stats'                                                                => [
685
-                'EventEspresso\core\domain\services\pue\Config'        => EE_Dependency_Map::load_from_cache,
686
-                'EE_Maintenance_Mode'                                  => EE_Dependency_Map::load_from_cache,
687
-                'EventEspresso\core\domain\services\pue\StatsGatherer' => EE_Dependency_Map::load_from_cache,
688
-            ],
689
-            'EventEspresso\core\domain\services\pue\Config'                                                               => [
690
-                'EE_Network_Config' => EE_Dependency_Map::load_from_cache,
691
-                'EE_Config'         => EE_Dependency_Map::load_from_cache,
692
-            ],
693
-            'EventEspresso\core\domain\services\pue\StatsGatherer'                                                        => [
694
-                'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
695
-                'EEM_Event'          => EE_Dependency_Map::load_from_cache,
696
-                'EEM_Datetime'       => EE_Dependency_Map::load_from_cache,
697
-                'EEM_Ticket'         => EE_Dependency_Map::load_from_cache,
698
-                'EEM_Registration'   => EE_Dependency_Map::load_from_cache,
699
-                'EEM_Transaction'    => EE_Dependency_Map::load_from_cache,
700
-                'EE_Config'          => EE_Dependency_Map::load_from_cache,
701
-            ],
702
-            'EventEspresso\core\domain\services\admin\ExitModal'                                                          => [
703
-                'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache,
704
-            ],
705
-            'EventEspresso\core\domain\services\admin\PluginUpsells'                                                      => [
706
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
707
-            ],
708
-            'EventEspresso\caffeinated\modules\recaptcha_invisible\InvisibleRecaptcha'                                    => [
709
-                'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
710
-                'EE_Session'             => EE_Dependency_Map::load_from_cache,
711
-            ],
712
-            'EventEspresso\caffeinated\modules\recaptcha_invisible\RecaptchaAdminSettings'                                => [
713
-                'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
714
-            ],
715
-            'EventEspresso\modules\ticket_selector\DisplayTicketSelector' => [
716
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
717
-                'EE_Ticket_Selector_Config'                   => EE_Dependency_Map::load_from_cache,
718
-            ],
719
-            'EventEspresso\modules\ticket_selector\ProcessTicketSelector'                                                 => [
720
-                'EE_Core_Config'                                                          => EE_Dependency_Map::load_from_cache,
721
-                'EventEspresso\core\services\request\Request'                             => EE_Dependency_Map::load_from_cache,
722
-                'EE_Session'                                                              => EE_Dependency_Map::load_from_cache,
723
-                'EEM_Ticket'                                                              => EE_Dependency_Map::load_from_cache,
724
-                'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker' => EE_Dependency_Map::load_from_cache,
725
-            ],
726
-            'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker'                                     => [
727
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
728
-            ],
729
-            'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'                              => [
730
-                'EE_Core_Config'                             => EE_Dependency_Map::load_from_cache,
731
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
732
-            ],
733
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes'                                => [
734
-                'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
735
-            ],
736
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomies'                               => [
737
-                'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
738
-            ],
739
-            'EE_CPT_Strategy'                                                                                             => [
740
-                'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
741
-                'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
742
-            ],
743
-            'EventEspresso\core\services\loaders\ObjectIdentifier'                                                        => [
744
-                'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
745
-            ],
746
-            'EventEspresso\core\domain\services\assets\CoreAssetManager'                                                  => [
747
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
748
-                'EE_Currency_Config'                                 => EE_Dependency_Map::load_from_cache,
749
-                'EE_Template_Config'                                 => EE_Dependency_Map::load_from_cache,
750
-                'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
751
-                'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
752
-            ],
753
-            'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy'                                       => [
754
-                'EEM_Payment_Method'                                       => EE_Dependency_Map::load_from_cache,
755
-                'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
756
-            ],
757
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee'                                      => [
758
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
759
-            ],
760
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData'                           => [
761
-                'EEM_Attendee'       => EE_Dependency_Map::load_from_cache,
762
-                'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
763
-            ],
764
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins'                                      => [
765
-                'EEM_Checkin' => EE_Dependency_Map::load_from_cache,
766
-            ],
767
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration'                                  => [
768
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache,
769
-            ],
770
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction'                                   => [
771
-                'EEM_Transaction' => EE_Dependency_Map::load_from_cache,
772
-            ],
773
-            'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData'                                  => [
774
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
775
-            ],
776
-            'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers'                                       => [
777
-                'EEM_Answer'   => EE_Dependency_Map::load_from_cache,
778
-                'EEM_Question' => EE_Dependency_Map::load_from_cache,
779
-            ],
780
-            'EventEspresso\core\CPTs\CptQueryModifier'                                                                    => [
781
-                null,
782
-                null,
783
-                null,
784
-                'EventEspresso\core\services\request\CurrentPage' => EE_Dependency_Map::load_from_cache,
785
-                'EventEspresso\core\services\request\Request'     => EE_Dependency_Map::load_from_cache,
786
-                'EventEspresso\core\services\loaders\Loader'      => EE_Dependency_Map::load_from_cache,
787
-            ],
788
-            'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler'                           => [
789
-                'EE_Registry' => EE_Dependency_Map::load_from_cache,
790
-                'EE_Config'   => EE_Dependency_Map::load_from_cache,
791
-            ],
792
-            'EventEspresso\core\services\editor\BlockRegistrationManager'                                                 => [
793
-                'EventEspresso\core\services\assets\BlockAssetManagerCollection'         => EE_Dependency_Map::load_from_cache,
794
-                'EventEspresso\core\domain\entities\editor\BlockCollection'              => EE_Dependency_Map::load_from_cache,
795
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => EE_Dependency_Map::load_from_cache,
796
-                'EventEspresso\core\services\request\Request'                            => EE_Dependency_Map::load_from_cache,
797
-            ],
798
-            'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager'                                            => [
799
-                'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
800
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
801
-                'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
802
-            ],
803
-            'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer'                                       => [
804
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
805
-                'EEM_Attendee'                     => EE_Dependency_Map::load_from_cache,
806
-            ],
807
-            'EventEspresso\core\domain\entities\editor\blocks\EventAttendees'                                             => [
808
-                'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager'      => self::load_from_cache,
809
-                'EventEspresso\core\services\request\Request'                           => EE_Dependency_Map::load_from_cache,
810
-                'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer' => self::load_from_cache,
811
-            ],
812
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver'                           => [
813
-                'EventEspresso\core\services\container\Mirror'            => EE_Dependency_Map::load_from_cache,
814
-                'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
815
-                'EE_Dependency_Map'                                       => EE_Dependency_Map::load_from_cache,
816
-            ],
817
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory'                                      => [
818
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => EE_Dependency_Map::load_from_cache,
819
-                'EventEspresso\core\services\loaders\Loader'                                        => EE_Dependency_Map::load_from_cache,
820
-            ],
821
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationManager'                                      => [
822
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationCollection' => EE_Dependency_Map::load_from_cache,
823
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory'    => EE_Dependency_Map::load_from_cache,
824
-            ],
825
-            'EventEspresso\core\libraries\rest_api\CalculatedModelFields'                                                 => [
826
-                'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache,
827
-            ],
828
-            'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory'                             => [
829
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
830
-            ],
831
-            'EventEspresso\core\libraries\rest_api\controllers\model\Read'                                                => [
832
-                'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache,
833
-            ],
834
-            'EventEspresso\core\libraries\rest_api\calculations\Datetime'                                                 => [
835
-                'EEM_Datetime'     => EE_Dependency_Map::load_from_cache,
836
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache,
837
-            ],
838
-            'EventEspresso\core\libraries\rest_api\calculations\Event'                                                    => [
839
-                'EEM_Event'        => EE_Dependency_Map::load_from_cache,
840
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache,
841
-            ],
842
-            'EventEspresso\core\libraries\rest_api\calculations\Registration'                                             => [
843
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache,
844
-            ],
845
-            'EventEspresso\core\services\session\SessionStartHandler'                                                     => [
846
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
847
-            ],
848
-            'EE_URL_Validation_Strategy'                                                                                  => [
849
-                null,
850
-                null,
851
-                'EventEspresso\core\services\validators\URLValidator' => EE_Dependency_Map::load_from_cache,
852
-            ],
853
-            'EventEspresso\admin_pages\general_settings\OrganizationSettings'                                             => [
854
-                'EE_Registry'                                             => EE_Dependency_Map::load_from_cache,
855
-                'EE_Organization_Config'                                  => EE_Dependency_Map::load_from_cache,
856
-                'EE_Core_Config'                                          => EE_Dependency_Map::load_from_cache,
857
-                'EE_Network_Core_Config'                                  => EE_Dependency_Map::load_from_cache,
858
-                'EventEspresso\core\services\address\CountrySubRegionDao' => EE_Dependency_Map::load_from_cache,
859
-            ],
860
-            'EventEspresso\core\services\address\CountrySubRegionDao'                                                     => [
861
-                'EEM_State'                                            => EE_Dependency_Map::load_from_cache,
862
-                'EventEspresso\core\services\validators\JsonValidator' => EE_Dependency_Map::load_from_cache,
863
-            ],
864
-            'EventEspresso\core\domain\services\admin\ajax\WordpressHeartbeat'                                            => [
865
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
866
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
867
-            ],
868
-            'EventEspresso\core\domain\services\admin\ajax\EventEditorHeartbeat'                                          => [
869
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
870
-                'EE_Environment_Config'            => EE_Dependency_Map::load_from_cache,
871
-            ],
872
-            'EventEspresso\core\services\request\files\FilesDataHandler'                                                  => [
873
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
874
-            ],
875
-            'EventEspressoBatchRequest\BatchRequestProcessor'                                                             => [
876
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
877
-            ],
878
-            'EventEspresso\core\domain\services\admin\registrations\list_table\QueryBuilder'                              => [
879
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
880
-                'EEM_Registration'                            => EE_Dependency_Map::load_from_cache,
881
-                null,
882
-            ],
883
-            'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\AttendeeFilterHeader'          => [
884
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
885
-                'EEM_Attendee'                                => EE_Dependency_Map::load_from_cache,
886
-            ],
887
-            'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\DateFilterHeader'              => [
888
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
889
-                'EEM_Datetime'                                => EE_Dependency_Map::load_from_cache,
890
-            ],
891
-            'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\EventFilterHeader'             => [
892
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
893
-                'EEM_Event'                                   => EE_Dependency_Map::load_from_cache,
894
-            ],
895
-            'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\TicketFilterHeader'            => [
896
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
897
-                'EEM_Ticket'                                  => EE_Dependency_Map::load_from_cache,
898
-            ],
899
-            'EventEspressoBatchRequest\JobHandlers\ExecuteBatchDeletion'                                                  => [
900
-                'EventEspresso\core\services\orm\tree_traversal\NodeGroupDao' => EE_Dependency_Map::load_from_cache,
901
-            ],
902
-            'EventEspressoBatchRequest\JobHandlers\PreviewEventDeletion'                                                  => [
903
-                'EventEspresso\core\services\orm\tree_traversal\NodeGroupDao' => EE_Dependency_Map::load_from_cache,
904
-            ],
905
-            'EventEspresso\core\domain\services\admin\events\data\PreviewDeletion'                                        => [
906
-                'EventEspresso\core\services\orm\tree_traversal\NodeGroupDao' => EE_Dependency_Map::load_from_cache,
907
-                'EEM_Event'                                                   => EE_Dependency_Map::load_from_cache,
908
-                'EEM_Datetime'                                                => EE_Dependency_Map::load_from_cache,
909
-                'EEM_Registration'                                            => EE_Dependency_Map::load_from_cache,
910
-            ],
911
-            'EventEspresso\core\domain\services\admin\events\data\ConfirmDeletion'                                        => [
912
-                'EventEspresso\core\services\orm\tree_traversal\NodeGroupDao' => EE_Dependency_Map::load_from_cache,
913
-            ],
914
-            'EventEspresso\core\services\request\CurrentPage'                                                             => [
915
-                'EE_CPT_Strategy'                             => EE_Dependency_Map::load_from_cache,
916
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
917
-            ],
918
-            'EventEspresso\core\services\shortcodes\LegacyShortcodesManager'                                              => [
919
-                'EE_Registry'                                     => EE_Dependency_Map::load_from_cache,
920
-                'EventEspresso\core\services\request\CurrentPage' => EE_Dependency_Map::load_from_cache,
921
-            ],
922
-            'EventEspresso\core\services\shortcodes\ShortcodesManager'                                                    => [
923
-                'EventEspresso\core\services\shortcodes\LegacyShortcodesManager' => EE_Dependency_Map::load_from_cache,
924
-                'EventEspresso\core\services\request\CurrentPage'                => EE_Dependency_Map::load_from_cache,
925
-            ],
926
-        ];
927
-    }
928
-
929
-
930
-    /**
931
-     * Registers how core classes are loaded.
932
-     * This can either be done by simply providing the name of one of the EE_Registry loader methods such as:
933
-     *        'EE_Request_Handler' => 'load_core'
934
-     *        'EE_Messages_Queue'  => 'load_lib'
935
-     *        'EEH_Debug_Tools'    => 'load_helper'
936
-     * or, if greater control is required, by providing a custom closure. For example:
937
-     *        'Some_Class' => function () {
938
-     *            return new Some_Class();
939
-     *        },
940
-     * This is required for instantiating dependencies
941
-     * where an interface has been type hinted in a class constructor. For example:
942
-     *        'Required_Interface' => function () {
943
-     *            return new A_Class_That_Implements_Required_Interface();
944
-     *        },
945
-     */
946
-    protected function _register_core_class_loaders()
947
-    {
948
-        $this->_class_loaders = [
949
-            // load_core
950
-            'EE_Dependency_Map'                            => function () {
951
-                return $this;
952
-            },
953
-            'EE_Capabilities'                              => 'load_core',
954
-            'EE_Encryption'                                => 'load_core',
955
-            'EE_Front_Controller'                          => 'load_core',
956
-            'EE_Module_Request_Router'                     => 'load_core',
957
-            'EE_Registry'                                  => 'load_core',
958
-            'EE_Request'                                   => function () {
959
-                return $this->legacy_request;
960
-            },
961
-            'EventEspresso\core\services\request\Request'  => function () {
962
-                return $this->request;
963
-            },
964
-            'EventEspresso\core\services\request\Response' => function () {
965
-                return $this->response;
966
-            },
967
-            'EE_Base'                                      => 'load_core',
968
-            'EE_Request_Handler'                           => 'load_core',
969
-            'EE_Session'                                   => 'load_core',
970
-            'EE_Cron_Tasks'                                => 'load_core',
971
-            'EE_System'                                    => 'load_core',
972
-            'EE_Maintenance_Mode'                          => 'load_core',
973
-            'EE_Register_CPTs'                             => 'load_core',
974
-            'EE_Admin'                                     => 'load_core',
975
-            'EE_CPT_Strategy'                              => 'load_core',
976
-            // load_class
977
-            'EE_Registration_Processor'                    => 'load_class',
978
-            // load_lib
979
-            'EE_Message_Resource_Manager'                  => 'load_lib',
980
-            'EE_Message_Type_Collection'                   => 'load_lib',
981
-            'EE_Message_Type_Collection_Loader'            => 'load_lib',
982
-            'EE_Messenger_Collection'                      => 'load_lib',
983
-            'EE_Messenger_Collection_Loader'               => 'load_lib',
984
-            'EE_Messages_Processor'                        => 'load_lib',
985
-            'EE_Message_Repository'                        => 'load_lib',
986
-            'EE_Messages_Queue'                            => 'load_lib',
987
-            'EE_Messages_Data_Handler_Collection'          => 'load_lib',
988
-            'EE_Message_Template_Group_Collection'         => 'load_lib',
989
-            'EE_Payment_Method_Manager'                    => 'load_lib',
990
-            'EE_DMS_Core_4_1_0'                            => 'load_dms',
991
-            'EE_DMS_Core_4_2_0'                            => 'load_dms',
992
-            'EE_DMS_Core_4_3_0'                            => 'load_dms',
993
-            'EE_DMS_Core_4_5_0'                            => 'load_dms',
994
-            'EE_DMS_Core_4_6_0'                            => 'load_dms',
995
-            'EE_DMS_Core_4_7_0'                            => 'load_dms',
996
-            'EE_DMS_Core_4_8_0'                            => 'load_dms',
997
-            'EE_DMS_Core_4_9_0'                            => 'load_dms',
998
-            'EE_DMS_Core_4_10_0'                           => 'load_dms',
999
-            'EE_Messages_Generator'                        => function () {
1000
-                return EE_Registry::instance()->load_lib(
1001
-                    'Messages_Generator',
1002
-                    [],
1003
-                    false,
1004
-                    false
1005
-                );
1006
-            },
1007
-            'EE_Messages_Template_Defaults'                => function ($arguments = []) {
1008
-                return EE_Registry::instance()->load_lib(
1009
-                    'Messages_Template_Defaults',
1010
-                    $arguments,
1011
-                    false,
1012
-                    false
1013
-                );
1014
-            },
1015
-            // load_helper
1016
-            'EEH_Parse_Shortcodes'                         => function () {
1017
-                if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
1018
-                    return new EEH_Parse_Shortcodes();
1019
-                }
1020
-                return null;
1021
-            },
1022
-            'EE_Template_Config'                           => function () {
1023
-                return EE_Config::instance()->template_settings;
1024
-            },
1025
-            'EE_Currency_Config'                           => function () {
1026
-                return EE_Config::instance()->currency;
1027
-            },
1028
-            'EE_Registration_Config'                       => function () {
1029
-                return EE_Config::instance()->registration;
1030
-            },
1031
-            'EE_Core_Config'                               => function () {
1032
-                return EE_Config::instance()->core;
1033
-            },
1034
-            'EventEspresso\core\services\loaders\Loader'   => function () {
1035
-                return LoaderFactory::getLoader();
1036
-            },
1037
-            'EE_Network_Config'                            => function () {
1038
-                return EE_Network_Config::instance();
1039
-            },
1040
-            'EE_Config'                                    => function () {
1041
-                return EE_Config::instance();
1042
-            },
1043
-            'EventEspresso\core\domain\Domain'             => function () {
1044
-                return DomainFactory::getEventEspressoCoreDomain();
1045
-            },
1046
-            'EE_Admin_Config'                              => function () {
1047
-                return EE_Config::instance()->admin;
1048
-            },
1049
-            'EE_Organization_Config'                       => function () {
1050
-                return EE_Config::instance()->organization;
1051
-            },
1052
-            'EE_Network_Core_Config'                       => function () {
1053
-                return EE_Network_Config::instance()->core;
1054
-            },
1055
-            'EE_Environment_Config'                        => function () {
1056
-                return EE_Config::instance()->environment;
1057
-            },
1058
-            'EE_Ticket_Selector_Config'                    => function () {
1059
-                return EE_Config::instance()->template_settings->EED_Ticket_Selector;
1060
-            },
1061
-        ];
1062
-    }
1063
-
1064
-
1065
-    /**
1066
-     * can be used for supplying alternate names for classes,
1067
-     * or for connecting interface names to instantiable classes
1068
-     */
1069
-    protected function _register_core_aliases()
1070
-    {
1071
-        $aliases = [
1072
-            'CommandBusInterface'                                                          => 'EventEspresso\core\services\commands\CommandBusInterface',
1073
-            'EventEspresso\core\services\commands\CommandBusInterface'                     => 'EventEspresso\core\services\commands\CommandBus',
1074
-            'CommandHandlerManagerInterface'                                               => 'EventEspresso\core\services\commands\CommandHandlerManagerInterface',
1075
-            'EventEspresso\core\services\commands\CommandHandlerManagerInterface'          => 'EventEspresso\core\services\commands\CommandHandlerManager',
1076
-            'CapChecker'                                                                   => 'EventEspresso\core\services\commands\middleware\CapChecker',
1077
-            'AddActionHook'                                                                => 'EventEspresso\core\services\commands\middleware\AddActionHook',
1078
-            'CapabilitiesChecker'                                                          => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1079
-            'CapabilitiesCheckerInterface'                                                 => 'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface',
1080
-            'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface' => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1081
-            'CreateRegistrationService'                                                    => 'EventEspresso\core\domain\services\registration\CreateRegistrationService',
1082
-            'CreateRegistrationCommandHandler'                                             => 'EventEspresso\core\services\commands\registration\CreateRegistrationCommand',
1083
-            'CopyRegistrationDetailsCommandHandler'                                        => 'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommand',
1084
-            'CopyRegistrationPaymentsCommandHandler'                                       => 'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommand',
1085
-            'CancelRegistrationAndTicketLineItemCommandHandler'                            => 'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler',
1086
-            'UpdateRegistrationAndTransactionAfterChangeCommandHandler'                    => 'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler',
1087
-            'CreateTicketLineItemCommandHandler'                                           => 'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommand',
1088
-            'CreateTransactionCommandHandler'                                              => 'EventEspresso\core\services\commands\transaction\CreateTransactionCommandHandler',
1089
-            'CreateAttendeeCommandHandler'                                                 => 'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler',
1090
-            'TableManager'                                                                 => 'EventEspresso\core\services\database\TableManager',
1091
-            'TableAnalysis'                                                                => 'EventEspresso\core\services\database\TableAnalysis',
1092
-            'EspressoShortcode'                                                            => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1093
-            'ShortcodeInterface'                                                           => 'EventEspresso\core\services\shortcodes\ShortcodeInterface',
1094
-            'EventEspresso\core\services\shortcodes\ShortcodeInterface'                    => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1095
-            'EventEspresso\core\services\cache\CacheStorageInterface'                      => 'EventEspresso\core\services\cache\TransientCacheStorage',
1096
-            'LoaderInterface'                                                              => 'EventEspresso\core\services\loaders\LoaderInterface',
1097
-            'EventEspresso\core\services\loaders\LoaderInterface'                          => 'EventEspresso\core\services\loaders\Loader',
1098
-            'CommandFactoryInterface'                                                      => 'EventEspresso\core\services\commands\CommandFactoryInterface',
1099
-            'EventEspresso\core\services\commands\CommandFactoryInterface'                 => 'EventEspresso\core\services\commands\CommandFactory',
1100
-            'EmailValidatorInterface'                                                      => 'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface',
1101
-            'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface'  => 'EventEspresso\core\domain\services\validation\email\EmailValidationService',
1102
-            'NoticeConverterInterface'                                                     => 'EventEspresso\core\services\notices\NoticeConverterInterface',
1103
-            'EventEspresso\core\services\notices\NoticeConverterInterface'                 => 'EventEspresso\core\services\notices\ConvertNoticesToEeErrors',
1104
-            'NoticesContainerInterface'                                                    => 'EventEspresso\core\services\notices\NoticesContainerInterface',
1105
-            'EventEspresso\core\services\notices\NoticesContainerInterface'                => 'EventEspresso\core\services\notices\NoticesContainer',
1106
-            'EventEspresso\core\services\request\RequestInterface'                         => 'EventEspresso\core\services\request\Request',
1107
-            'EventEspresso\core\services\request\ResponseInterface'                        => 'EventEspresso\core\services\request\Response',
1108
-            'EventEspresso\core\domain\DomainInterface'                                    => 'EventEspresso\core\domain\Domain',
1109
-            'Registration_Processor'                                                       => 'EE_Registration_Processor',
1110
-        ];
1111
-        foreach ($aliases as $alias => $fqn) {
1112
-            if (is_array($fqn)) {
1113
-                foreach ($fqn as $class => $for_class) {
1114
-                    $this->class_cache->addAlias($class, $alias, $for_class);
1115
-                }
1116
-                continue;
1117
-            }
1118
-            $this->class_cache->addAlias($fqn, $alias);
1119
-        }
1120
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
1121
-            $this->class_cache->addAlias(
1122
-                'EventEspresso\core\services\notices\ConvertNoticesToAdminNotices',
1123
-                'EventEspresso\core\services\notices\NoticeConverterInterface'
1124
-            );
1125
-        }
1126
-    }
1127
-
1128
-
1129
-    public function debug($for_class = '')
1130
-    {
1131
-        $this->class_cache->debug($for_class);
1132
-    }
1133
-
1134
-
1135
-    /**
1136
-     * This is used to reset the internal map and class_loaders to their original default state at the beginning of the
1137
-     * request Primarily used by unit tests.
1138
-     */
1139
-    public function reset()
1140
-    {
1141
-        $this->_register_core_class_loaders();
1142
-        $this->_register_core_dependencies();
1143
-    }
1144
-
1145
-
1146
-    /**
1147
-     * PLZ NOTE: a better name for this method would be is_alias()
1148
-     * because it returns TRUE if the provided fully qualified name IS an alias
1149
-     * WHY?
1150
-     * Because if a class is type hinting for a concretion,
1151
-     * then why would we need to find another class to supply it?
1152
-     * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
1153
-     * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
1154
-     * Don't go looking for some substitute.
1155
-     * Whereas if a class is type hinting for an interface...
1156
-     * then we need to find an actual class to use.
1157
-     * So the interface IS the alias for some other FQN,
1158
-     * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
1159
-     * represents some other class.
1160
-     *
1161
-     * @param string $fqn
1162
-     * @param string $for_class
1163
-     * @return bool
1164
-     * @deprecated 4.9.62.p
1165
-     */
1166
-    public function has_alias($fqn = '', $for_class = '')
1167
-    {
1168
-        return $this->isAlias($fqn, $for_class);
1169
-    }
1170
-
1171
-
1172
-    /**
1173
-     * PLZ NOTE: a better name for this method would be get_fqn_for_alias()
1174
-     * because it returns a FQN for provided alias if one exists, otherwise returns the original $alias
1175
-     * functions recursively, so that multiple aliases can be used to drill down to a FQN
1176
-     *  for example:
1177
-     *      if the following two entries were added to the _aliases array:
1178
-     *          array(
1179
-     *              'interface_alias'           => 'some\namespace\interface'
1180
-     *              'some\namespace\interface'  => 'some\namespace\classname'
1181
-     *          )
1182
-     *      then one could use EE_Registry::instance()->create( 'interface_alias' )
1183
-     *      to load an instance of 'some\namespace\classname'
1184
-     *
1185
-     * @param string $alias
1186
-     * @param string $for_class
1187
-     * @return string
1188
-     * @deprecated 4.9.62.p
1189
-     */
1190
-    public function get_alias($alias = '', $for_class = '')
1191
-    {
1192
-        return $this->getFqnForAlias($alias, $for_class);
1193
-    }
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 = [];
87
+
88
+	/**
89
+	 * @type array $_class_loaders
90
+	 */
91
+	protected $_class_loaders = [];
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 (
126
+			! self::$_instance instanceof EE_Dependency_Map
127
+			&& $class_cache instanceof ClassInterfaceCache
128
+		) {
129
+			self::$_instance = new EE_Dependency_Map($class_cache);
130
+		}
131
+		return self::$_instance;
132
+	}
133
+
134
+
135
+	/**
136
+	 * @param RequestInterface $request
137
+	 */
138
+	public function setRequest(RequestInterface $request)
139
+	{
140
+		$this->request = $request;
141
+	}
142
+
143
+
144
+	/**
145
+	 * @param LegacyRequestInterface $legacy_request
146
+	 */
147
+	public function setLegacyRequest(LegacyRequestInterface $legacy_request)
148
+	{
149
+		$this->legacy_request = $legacy_request;
150
+	}
151
+
152
+
153
+	/**
154
+	 * @param ResponseInterface $response
155
+	 */
156
+	public function setResponse(ResponseInterface $response)
157
+	{
158
+		$this->response = $response;
159
+	}
160
+
161
+
162
+	/**
163
+	 * @param LoaderInterface $loader
164
+	 */
165
+	public function setLoader(LoaderInterface $loader)
166
+	{
167
+		$this->loader = $loader;
168
+	}
169
+
170
+
171
+	/**
172
+	 * @param string $class
173
+	 * @param array  $dependencies
174
+	 * @param int    $overwrite
175
+	 * @return bool
176
+	 */
177
+	public static function register_dependencies(
178
+		$class,
179
+		array $dependencies,
180
+		$overwrite = EE_Dependency_Map::KEEP_EXISTING_DEPENDENCIES
181
+	) {
182
+		return self::$_instance->registerDependencies($class, $dependencies, $overwrite);
183
+	}
184
+
185
+
186
+	/**
187
+	 * Assigns an array of class names and corresponding load sources (new or cached)
188
+	 * to the class specified by the first parameter.
189
+	 * IMPORTANT !!!
190
+	 * The order of elements in the incoming $dependencies array MUST match
191
+	 * the order of the constructor parameters for the class in question.
192
+	 * This is especially important when overriding any existing dependencies that are registered.
193
+	 * the third parameter controls whether any duplicate dependencies are overwritten or not.
194
+	 *
195
+	 * @param string $class
196
+	 * @param array  $dependencies
197
+	 * @param int    $overwrite
198
+	 * @return bool
199
+	 */
200
+	public function registerDependencies(
201
+		$class,
202
+		array $dependencies,
203
+		$overwrite = EE_Dependency_Map::KEEP_EXISTING_DEPENDENCIES
204
+	) {
205
+		$class      = trim($class, '\\');
206
+		$registered = false;
207
+		if (empty(self::$_instance->_dependency_map[ $class ])) {
208
+			self::$_instance->_dependency_map[ $class ] = [];
209
+		}
210
+		// we need to make sure that any aliases used when registering a dependency
211
+		// get resolved to the correct class name
212
+		foreach ($dependencies as $dependency => $load_source) {
213
+			$alias = self::$_instance->getFqnForAlias($dependency);
214
+			if (
215
+				$overwrite === EE_Dependency_Map::OVERWRITE_DEPENDENCIES
216
+				|| ! isset(self::$_instance->_dependency_map[ $class ][ $alias ])
217
+			) {
218
+				unset($dependencies[ $dependency ]);
219
+				$dependencies[ $alias ] = $load_source;
220
+				$registered             = true;
221
+			}
222
+		}
223
+		// now add our two lists of dependencies together.
224
+		// using Union (+=) favours the arrays in precedence from left to right,
225
+		// so $dependencies is NOT overwritten because it is listed first
226
+		// ie: with A = B + C, entries in B take precedence over duplicate entries in C
227
+		// Union is way faster than array_merge() but should be used with caution...
228
+		// especially with numerically indexed arrays
229
+		$dependencies += self::$_instance->_dependency_map[ $class ];
230
+		// now we need to ensure that the resulting dependencies
231
+		// array only has the entries that are required for the class
232
+		// so first count how many dependencies were originally registered for the class
233
+		$dependency_count = count(self::$_instance->_dependency_map[ $class ]);
234
+		// if that count is non-zero (meaning dependencies were already registered)
235
+		self::$_instance->_dependency_map[ $class ] = $dependency_count
236
+			// then truncate the  final array to match that count
237
+			? array_slice($dependencies, 0, $dependency_count)
238
+			// otherwise just take the incoming array because nothing previously existed
239
+			: $dependencies;
240
+		return $registered;
241
+	}
242
+
243
+
244
+	/**
245
+	 * @param string $class_name
246
+	 * @param string $loader
247
+	 * @param bool   $overwrite
248
+	 * @return bool
249
+	 * @throws DomainException
250
+	 */
251
+	public static function register_class_loader($class_name, $loader = 'load_core', $overwrite = false)
252
+	{
253
+		if (! $loader instanceof Closure && strpos($class_name, '\\') !== false) {
254
+			throw new DomainException(
255
+				esc_html__('Don\'t use class loaders for FQCNs.', 'event_espresso')
256
+			);
257
+		}
258
+		// check that loader is callable or method starts with "load_" and exists in EE_Registry
259
+		if (
260
+			! is_callable($loader)
261
+			&& (
262
+				strpos($loader, 'load_') !== 0
263
+				|| ! method_exists('EE_Registry', $loader)
264
+			)
265
+		) {
266
+			throw new DomainException(
267
+				sprintf(
268
+					esc_html__(
269
+						'"%1$s" is not a valid loader method on EE_Registry.',
270
+						'event_espresso'
271
+					),
272
+					$loader
273
+				)
274
+			);
275
+		}
276
+		$class_name = self::$_instance->getFqnForAlias($class_name);
277
+		if ($overwrite || ! isset(self::$_instance->_class_loaders[ $class_name ])) {
278
+			self::$_instance->_class_loaders[ $class_name ] = $loader;
279
+			return true;
280
+		}
281
+		return false;
282
+	}
283
+
284
+
285
+	/**
286
+	 * @return array
287
+	 */
288
+	public function dependency_map()
289
+	{
290
+		return $this->_dependency_map;
291
+	}
292
+
293
+
294
+	/**
295
+	 * returns TRUE if dependency map contains a listing for the provided class name
296
+	 *
297
+	 * @param string $class_name
298
+	 * @return boolean
299
+	 */
300
+	public function has($class_name = '')
301
+	{
302
+		// all legacy models have the same dependencies
303
+		if (strpos($class_name, 'EEM_') === 0) {
304
+			$class_name = 'LEGACY_MODELS';
305
+		}
306
+		return isset($this->_dependency_map[ $class_name ]);
307
+	}
308
+
309
+
310
+	/**
311
+	 * returns TRUE if dependency map contains a listing for the provided class name AND dependency
312
+	 *
313
+	 * @param string $class_name
314
+	 * @param string $dependency
315
+	 * @return bool
316
+	 */
317
+	public function has_dependency_for_class($class_name = '', $dependency = '')
318
+	{
319
+		// all legacy models have the same dependencies
320
+		if (strpos($class_name, 'EEM_') === 0) {
321
+			$class_name = 'LEGACY_MODELS';
322
+		}
323
+		$dependency = $this->getFqnForAlias($dependency, $class_name);
324
+		return isset($this->_dependency_map[ $class_name ][ $dependency ]);
325
+	}
326
+
327
+
328
+	/**
329
+	 * returns loading strategy for whether a previously cached dependency should be loaded or a new instance returned
330
+	 *
331
+	 * @param string $class_name
332
+	 * @param string $dependency
333
+	 * @return int
334
+	 */
335
+	public function loading_strategy_for_class_dependency($class_name = '', $dependency = '')
336
+	{
337
+		// all legacy models have the same dependencies
338
+		if (strpos($class_name, 'EEM_') === 0) {
339
+			$class_name = 'LEGACY_MODELS';
340
+		}
341
+		$dependency = $this->getFqnForAlias($dependency);
342
+		return $this->has_dependency_for_class($class_name, $dependency)
343
+			? $this->_dependency_map[ $class_name ][ $dependency ]
344
+			: EE_Dependency_Map::not_registered;
345
+	}
346
+
347
+
348
+	/**
349
+	 * @param string $class_name
350
+	 * @return string | Closure
351
+	 */
352
+	public function class_loader($class_name)
353
+	{
354
+		// all legacy models use load_model()
355
+		if (strpos($class_name, 'EEM_') === 0) {
356
+			return 'load_model';
357
+		}
358
+		// EE_CPT_*_Strategy classes like EE_CPT_Event_Strategy, EE_CPT_Venue_Strategy, etc
359
+		// perform strpos() first to avoid loading regex every time we load a class
360
+		if (
361
+			strpos($class_name, 'EE_CPT_') === 0
362
+			&& preg_match('/^EE_CPT_([a-zA-Z]+)_Strategy$/', $class_name)
363
+		) {
364
+			return 'load_core';
365
+		}
366
+		$class_name = $this->getFqnForAlias($class_name);
367
+		return isset($this->_class_loaders[ $class_name ]) ? $this->_class_loaders[ $class_name ] : '';
368
+	}
369
+
370
+
371
+	/**
372
+	 * @return array
373
+	 */
374
+	public function class_loaders()
375
+	{
376
+		return $this->_class_loaders;
377
+	}
378
+
379
+
380
+	/**
381
+	 * adds an alias for a classname
382
+	 *
383
+	 * @param string $fqcn      the class name that should be used (concrete class to replace interface)
384
+	 * @param string $alias     the class name that would be type hinted for (abstract parent or interface)
385
+	 * @param string $for_class the class that has the dependency (is type hinting for the interface)
386
+	 */
387
+	public function add_alias($fqcn, $alias, $for_class = '')
388
+	{
389
+		$this->class_cache->addAlias($fqcn, $alias, $for_class);
390
+	}
391
+
392
+
393
+	/**
394
+	 * Returns TRUE if the provided fully qualified name IS an alias
395
+	 * WHY?
396
+	 * Because if a class is type hinting for a concretion,
397
+	 * then why would we need to find another class to supply it?
398
+	 * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
399
+	 * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
400
+	 * Don't go looking for some substitute.
401
+	 * Whereas if a class is type hinting for an interface...
402
+	 * then we need to find an actual class to use.
403
+	 * So the interface IS the alias for some other FQN,
404
+	 * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
405
+	 * represents some other class.
406
+	 *
407
+	 * @param string $fqn
408
+	 * @param string $for_class
409
+	 * @return bool
410
+	 */
411
+	public function isAlias($fqn = '', $for_class = '')
412
+	{
413
+		return $this->class_cache->isAlias($fqn, $for_class);
414
+	}
415
+
416
+
417
+	/**
418
+	 * Returns a FQN for provided alias if one exists, otherwise returns the original $alias
419
+	 * functions recursively, so that multiple aliases can be used to drill down to a FQN
420
+	 *  for example:
421
+	 *      if the following two entries were added to the _aliases array:
422
+	 *          array(
423
+	 *              'interface_alias'           => 'some\namespace\interface'
424
+	 *              'some\namespace\interface'  => 'some\namespace\classname'
425
+	 *          )
426
+	 *      then one could use EE_Registry::instance()->create( 'interface_alias' )
427
+	 *      to load an instance of 'some\namespace\classname'
428
+	 *
429
+	 * @param string $alias
430
+	 * @param string $for_class
431
+	 * @return string
432
+	 */
433
+	public function getFqnForAlias($alias = '', $for_class = '')
434
+	{
435
+		return $this->class_cache->getFqnForAlias($alias, $for_class);
436
+	}
437
+
438
+
439
+	/**
440
+	 * Registers the core dependencies and whether a previously instantiated object should be loaded from the cache,
441
+	 * if one exists, or whether a new object should be generated every time the requested class is loaded.
442
+	 * This is done by using the following class constants:
443
+	 *        EE_Dependency_Map::load_from_cache - loads previously instantiated object
444
+	 *        EE_Dependency_Map::load_new_object - generates a new object every time
445
+	 */
446
+	protected function _register_core_dependencies()
447
+	{
448
+		$this->_dependency_map = [
449
+			'EE_Admin'                                                                                          => [
450
+				'EventEspresso\core\services\request\Request'     => EE_Dependency_Map::load_from_cache,
451
+			],
452
+			'EE_Request_Handler'                                                                                          => [
453
+				'EventEspresso\core\services\request\Request'     => EE_Dependency_Map::load_from_cache,
454
+				'EventEspresso\core\services\request\Response'    => EE_Dependency_Map::load_from_cache,
455
+			],
456
+			'EE_System'                                                                                                   => [
457
+				'EE_Registry'                                 => EE_Dependency_Map::load_from_cache,
458
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
459
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
460
+				'EE_Maintenance_Mode'                         => EE_Dependency_Map::load_from_cache,
461
+			],
462
+			'EE_Session'                                                                                                  => [
463
+				'EventEspresso\core\services\cache\TransientCacheStorage'  => EE_Dependency_Map::load_from_cache,
464
+				'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
465
+				'EventEspresso\core\services\request\Request'              => EE_Dependency_Map::load_from_cache,
466
+				'EventEspresso\core\services\session\SessionStartHandler'  => EE_Dependency_Map::load_from_cache,
467
+				'EE_Encryption'                                            => EE_Dependency_Map::load_from_cache,
468
+			],
469
+			'EE_Cart'                                                                                                     => [
470
+				'EE_Session' => EE_Dependency_Map::load_from_cache,
471
+			],
472
+			'EE_Front_Controller'                                                                                         => [
473
+				'EE_Registry'                                     => EE_Dependency_Map::load_from_cache,
474
+				'EventEspresso\core\services\request\CurrentPage' => EE_Dependency_Map::load_from_cache,
475
+				'EE_Module_Request_Router'                        => EE_Dependency_Map::load_from_cache,
476
+			],
477
+			'EE_Messenger_Collection_Loader'                                                                              => [
478
+				'EE_Messenger_Collection' => EE_Dependency_Map::load_new_object,
479
+			],
480
+			'EE_Message_Type_Collection_Loader'                                                                           => [
481
+				'EE_Message_Type_Collection' => EE_Dependency_Map::load_new_object,
482
+			],
483
+			'EE_Message_Resource_Manager'                                                                                 => [
484
+				'EE_Messenger_Collection_Loader'    => EE_Dependency_Map::load_new_object,
485
+				'EE_Message_Type_Collection_Loader' => EE_Dependency_Map::load_new_object,
486
+				'EEM_Message_Template_Group'        => EE_Dependency_Map::load_from_cache,
487
+			],
488
+			'EE_Message_Factory'                                                                                          => [
489
+				'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
490
+			],
491
+			'EE_messages'                                                                                                 => [
492
+				'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
493
+			],
494
+			'EE_Messages_Generator'                                                                                       => [
495
+				'EE_Messages_Queue'                    => EE_Dependency_Map::load_new_object,
496
+				'EE_Messages_Data_Handler_Collection'  => EE_Dependency_Map::load_new_object,
497
+				'EE_Message_Template_Group_Collection' => EE_Dependency_Map::load_new_object,
498
+				'EEH_Parse_Shortcodes'                 => EE_Dependency_Map::load_from_cache,
499
+			],
500
+			'EE_Messages_Processor'                                                                                       => [
501
+				'EE_Message_Resource_Manager' => EE_Dependency_Map::load_from_cache,
502
+			],
503
+			'EE_Messages_Queue'                                                                                           => [
504
+				'EE_Message_Repository' => EE_Dependency_Map::load_new_object,
505
+			],
506
+			'EE_Messages_Template_Defaults'                                                                               => [
507
+				'EEM_Message_Template_Group' => EE_Dependency_Map::load_from_cache,
508
+				'EEM_Message_Template'       => EE_Dependency_Map::load_from_cache,
509
+			],
510
+			'EE_Message_To_Generate_From_Request'                                                                         => [
511
+				'EE_Message_Resource_Manager'                 => EE_Dependency_Map::load_from_cache,
512
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
513
+			],
514
+			'EventEspresso\core\services\commands\CommandBus'                                                             => [
515
+				'EventEspresso\core\services\commands\CommandHandlerManager' => EE_Dependency_Map::load_from_cache,
516
+			],
517
+			'EventEspresso\services\commands\CommandHandler'                                                              => [
518
+				'EE_Registry'         => EE_Dependency_Map::load_from_cache,
519
+				'CommandBusInterface' => EE_Dependency_Map::load_from_cache,
520
+			],
521
+			'EventEspresso\core\services\commands\CommandHandlerManager'                                                  => [
522
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
523
+			],
524
+			'EventEspresso\core\services\commands\CompositeCommandHandler'                                                => [
525
+				'EventEspresso\core\services\commands\CommandBus'     => EE_Dependency_Map::load_from_cache,
526
+				'EventEspresso\core\services\commands\CommandFactory' => EE_Dependency_Map::load_from_cache,
527
+			],
528
+			'EventEspresso\core\services\commands\CommandFactory'                                                         => [
529
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
530
+			],
531
+			'EventEspresso\core\services\commands\middleware\CapChecker'                                                  => [
532
+				'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
533
+			],
534
+			'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker'                                         => [
535
+				'EE_Capabilities' => EE_Dependency_Map::load_from_cache,
536
+			],
537
+			'EventEspresso\core\domain\services\capabilities\RegistrationsCapChecker'                                     => [
538
+				'EE_Capabilities' => EE_Dependency_Map::load_from_cache,
539
+			],
540
+			'EventEspresso\core\services\commands\registration\CreateRegistrationCommandHandler'                          => [
541
+				'EventEspresso\core\domain\services\registration\CreateRegistrationService' => EE_Dependency_Map::load_from_cache,
542
+			],
543
+			'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommandHandler'                     => [
544
+				'EventEspresso\core\domain\services\registration\CopyRegistrationService' => EE_Dependency_Map::load_from_cache,
545
+			],
546
+			'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommandHandler'                    => [
547
+				'EventEspresso\core\domain\services\registration\CopyRegistrationService' => EE_Dependency_Map::load_from_cache,
548
+			],
549
+			'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler'         => [
550
+				'EventEspresso\core\domain\services\registration\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
551
+			],
552
+			'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler' => [
553
+				'EventEspresso\core\domain\services\registration\UpdateRegistrationService' => EE_Dependency_Map::load_from_cache,
554
+			],
555
+			'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommandHandler'                              => [
556
+				'EventEspresso\core\domain\services\ticket\CreateTicketLineItemService' => EE_Dependency_Map::load_from_cache,
557
+			],
558
+			'EventEspresso\core\services\commands\ticket\CancelTicketLineItemCommandHandler'                              => [
559
+				'EventEspresso\core\domain\services\ticket\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
560
+			],
561
+			'EventEspresso\core\domain\services\registration\CancelRegistrationService'                                   => [
562
+				'EventEspresso\core\domain\services\ticket\CancelTicketLineItemService' => EE_Dependency_Map::load_from_cache,
563
+			],
564
+			'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler'                                  => [
565
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
566
+			],
567
+			'EventEspresso\core\services\database\TableManager'                                                           => [
568
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
569
+			],
570
+			'EE_Data_Migration_Class_Base'                                                                                => [
571
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
572
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
573
+			],
574
+			'EE_DMS_Core_4_1_0'                                                                                           => [
575
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
576
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
577
+			],
578
+			'EE_DMS_Core_4_2_0'                                                                                           => [
579
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
580
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
581
+			],
582
+			'EE_DMS_Core_4_3_0'                                                                                           => [
583
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
584
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
585
+			],
586
+			'EE_DMS_Core_4_4_0'                                                                                           => [
587
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
588
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
589
+			],
590
+			'EE_DMS_Core_4_5_0'                                                                                           => [
591
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
592
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
593
+			],
594
+			'EE_DMS_Core_4_6_0'                                                                                           => [
595
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
596
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
597
+			],
598
+			'EE_DMS_Core_4_7_0'                                                                                           => [
599
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
600
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
601
+			],
602
+			'EE_DMS_Core_4_8_0'                                                                                           => [
603
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
604
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
605
+			],
606
+			'EE_DMS_Core_4_9_0'                                                                                           => [
607
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
608
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
609
+			],
610
+			'EE_DMS_Core_4_10_0'                                                                                          => [
611
+				'EventEspresso\core\services\database\TableAnalysis' => EE_Dependency_Map::load_from_cache,
612
+				'EventEspresso\core\services\database\TableManager'  => EE_Dependency_Map::load_from_cache,
613
+				'EE_DMS_Core_4_9_0'                                  => EE_Dependency_Map::load_from_cache,
614
+			],
615
+			'EventEspresso\core\services\assets\I18nRegistry'                                                             => [
616
+				[],
617
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
618
+			],
619
+			'EventEspresso\core\services\assets\Registry'                                                                 => [
620
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
621
+				'EventEspresso\core\services\assets\I18nRegistry'    => EE_Dependency_Map::load_from_cache,
622
+			],
623
+			'EventEspresso\core\domain\entities\shortcodes\EspressoCancelled'                                             => [
624
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
625
+			],
626
+			'EventEspresso\core\domain\entities\shortcodes\EspressoCheckout'                                              => [
627
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
628
+			],
629
+			'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees'                                        => [
630
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
631
+			],
632
+			'EventEspresso\core\domain\entities\shortcodes\EspressoEvents'                                                => [
633
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
634
+			],
635
+			'EventEspresso\core\domain\entities\shortcodes\EspressoThankYou'                                              => [
636
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
637
+			],
638
+			'EventEspresso\core\domain\entities\shortcodes\EspressoTicketSelector'                                        => [
639
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
640
+			],
641
+			'EventEspresso\core\domain\entities\shortcodes\EspressoTxnPage'                                               => [
642
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
643
+			],
644
+			'EventEspresso\core\services\cache\BasicCacheManager'                                                         => [
645
+				'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
646
+			],
647
+			'EventEspresso\core\services\cache\PostRelatedCacheManager'                                                   => [
648
+				'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
649
+			],
650
+			'EventEspresso\core\domain\services\validation\email\EmailValidationService'                                  => [
651
+				'EE_Registration_Config'                     => EE_Dependency_Map::load_from_cache,
652
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
653
+			],
654
+			'EventEspresso\core\domain\values\EmailAddress'                                                               => [
655
+				null,
656
+				'EventEspresso\core\domain\services\validation\email\EmailValidationService' => EE_Dependency_Map::load_from_cache,
657
+			],
658
+			'EventEspresso\core\services\orm\ModelFieldFactory'                                                           => [
659
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
660
+			],
661
+			'LEGACY_MODELS'                                                                                               => [
662
+				null,
663
+				'EventEspresso\core\services\database\ModelFieldFactory' => EE_Dependency_Map::load_from_cache,
664
+			],
665
+			'EE_Module_Request_Router'                                                                                    => [
666
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
667
+			],
668
+			'EE_Registration_Processor'                                                                                   => [
669
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
670
+			],
671
+			'EventEspresso\core\services\notifications\PersistentAdminNoticeManager'                                      => [
672
+				null,
673
+				'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
674
+				'EventEspresso\core\services\request\Request'                         => EE_Dependency_Map::load_from_cache,
675
+			],
676
+			'EventEspresso\core\services\licensing\LicenseService'                                                        => [
677
+				'EventEspresso\core\domain\services\pue\Stats'  => EE_Dependency_Map::load_from_cache,
678
+				'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache,
679
+			],
680
+			'EE_Admin_Transactions_List_Table'                                                                            => [
681
+				null,
682
+				'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
683
+			],
684
+			'EventEspresso\core\domain\services\pue\Stats'                                                                => [
685
+				'EventEspresso\core\domain\services\pue\Config'        => EE_Dependency_Map::load_from_cache,
686
+				'EE_Maintenance_Mode'                                  => EE_Dependency_Map::load_from_cache,
687
+				'EventEspresso\core\domain\services\pue\StatsGatherer' => EE_Dependency_Map::load_from_cache,
688
+			],
689
+			'EventEspresso\core\domain\services\pue\Config'                                                               => [
690
+				'EE_Network_Config' => EE_Dependency_Map::load_from_cache,
691
+				'EE_Config'         => EE_Dependency_Map::load_from_cache,
692
+			],
693
+			'EventEspresso\core\domain\services\pue\StatsGatherer'                                                        => [
694
+				'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
695
+				'EEM_Event'          => EE_Dependency_Map::load_from_cache,
696
+				'EEM_Datetime'       => EE_Dependency_Map::load_from_cache,
697
+				'EEM_Ticket'         => EE_Dependency_Map::load_from_cache,
698
+				'EEM_Registration'   => EE_Dependency_Map::load_from_cache,
699
+				'EEM_Transaction'    => EE_Dependency_Map::load_from_cache,
700
+				'EE_Config'          => EE_Dependency_Map::load_from_cache,
701
+			],
702
+			'EventEspresso\core\domain\services\admin\ExitModal'                                                          => [
703
+				'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache,
704
+			],
705
+			'EventEspresso\core\domain\services\admin\PluginUpsells'                                                      => [
706
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
707
+			],
708
+			'EventEspresso\caffeinated\modules\recaptcha_invisible\InvisibleRecaptcha'                                    => [
709
+				'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
710
+				'EE_Session'             => EE_Dependency_Map::load_from_cache,
711
+			],
712
+			'EventEspresso\caffeinated\modules\recaptcha_invisible\RecaptchaAdminSettings'                                => [
713
+				'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
714
+			],
715
+			'EventEspresso\modules\ticket_selector\DisplayTicketSelector' => [
716
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
717
+				'EE_Ticket_Selector_Config'                   => EE_Dependency_Map::load_from_cache,
718
+			],
719
+			'EventEspresso\modules\ticket_selector\ProcessTicketSelector'                                                 => [
720
+				'EE_Core_Config'                                                          => EE_Dependency_Map::load_from_cache,
721
+				'EventEspresso\core\services\request\Request'                             => EE_Dependency_Map::load_from_cache,
722
+				'EE_Session'                                                              => EE_Dependency_Map::load_from_cache,
723
+				'EEM_Ticket'                                                              => EE_Dependency_Map::load_from_cache,
724
+				'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker' => EE_Dependency_Map::load_from_cache,
725
+			],
726
+			'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker'                                     => [
727
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
728
+			],
729
+			'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'                              => [
730
+				'EE_Core_Config'                             => EE_Dependency_Map::load_from_cache,
731
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
732
+			],
733
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes'                                => [
734
+				'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
735
+			],
736
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomies'                               => [
737
+				'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
738
+			],
739
+			'EE_CPT_Strategy'                                                                                             => [
740
+				'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
741
+				'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
742
+			],
743
+			'EventEspresso\core\services\loaders\ObjectIdentifier'                                                        => [
744
+				'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
745
+			],
746
+			'EventEspresso\core\domain\services\assets\CoreAssetManager'                                                  => [
747
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
748
+				'EE_Currency_Config'                                 => EE_Dependency_Map::load_from_cache,
749
+				'EE_Template_Config'                                 => EE_Dependency_Map::load_from_cache,
750
+				'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
751
+				'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
752
+			],
753
+			'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy'                                       => [
754
+				'EEM_Payment_Method'                                       => EE_Dependency_Map::load_from_cache,
755
+				'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
756
+			],
757
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee'                                      => [
758
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
759
+			],
760
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData'                           => [
761
+				'EEM_Attendee'       => EE_Dependency_Map::load_from_cache,
762
+				'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
763
+			],
764
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins'                                      => [
765
+				'EEM_Checkin' => EE_Dependency_Map::load_from_cache,
766
+			],
767
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration'                                  => [
768
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache,
769
+			],
770
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction'                                   => [
771
+				'EEM_Transaction' => EE_Dependency_Map::load_from_cache,
772
+			],
773
+			'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData'                                  => [
774
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
775
+			],
776
+			'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers'                                       => [
777
+				'EEM_Answer'   => EE_Dependency_Map::load_from_cache,
778
+				'EEM_Question' => EE_Dependency_Map::load_from_cache,
779
+			],
780
+			'EventEspresso\core\CPTs\CptQueryModifier'                                                                    => [
781
+				null,
782
+				null,
783
+				null,
784
+				'EventEspresso\core\services\request\CurrentPage' => EE_Dependency_Map::load_from_cache,
785
+				'EventEspresso\core\services\request\Request'     => EE_Dependency_Map::load_from_cache,
786
+				'EventEspresso\core\services\loaders\Loader'      => EE_Dependency_Map::load_from_cache,
787
+			],
788
+			'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler'                           => [
789
+				'EE_Registry' => EE_Dependency_Map::load_from_cache,
790
+				'EE_Config'   => EE_Dependency_Map::load_from_cache,
791
+			],
792
+			'EventEspresso\core\services\editor\BlockRegistrationManager'                                                 => [
793
+				'EventEspresso\core\services\assets\BlockAssetManagerCollection'         => EE_Dependency_Map::load_from_cache,
794
+				'EventEspresso\core\domain\entities\editor\BlockCollection'              => EE_Dependency_Map::load_from_cache,
795
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => EE_Dependency_Map::load_from_cache,
796
+				'EventEspresso\core\services\request\Request'                            => EE_Dependency_Map::load_from_cache,
797
+			],
798
+			'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager'                                            => [
799
+				'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
800
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
801
+				'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
802
+			],
803
+			'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer'                                       => [
804
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
805
+				'EEM_Attendee'                     => EE_Dependency_Map::load_from_cache,
806
+			],
807
+			'EventEspresso\core\domain\entities\editor\blocks\EventAttendees'                                             => [
808
+				'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager'      => self::load_from_cache,
809
+				'EventEspresso\core\services\request\Request'                           => EE_Dependency_Map::load_from_cache,
810
+				'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer' => self::load_from_cache,
811
+			],
812
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver'                           => [
813
+				'EventEspresso\core\services\container\Mirror'            => EE_Dependency_Map::load_from_cache,
814
+				'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
815
+				'EE_Dependency_Map'                                       => EE_Dependency_Map::load_from_cache,
816
+			],
817
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory'                                      => [
818
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => EE_Dependency_Map::load_from_cache,
819
+				'EventEspresso\core\services\loaders\Loader'                                        => EE_Dependency_Map::load_from_cache,
820
+			],
821
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationManager'                                      => [
822
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationCollection' => EE_Dependency_Map::load_from_cache,
823
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory'    => EE_Dependency_Map::load_from_cache,
824
+			],
825
+			'EventEspresso\core\libraries\rest_api\CalculatedModelFields'                                                 => [
826
+				'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache,
827
+			],
828
+			'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory'                             => [
829
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
830
+			],
831
+			'EventEspresso\core\libraries\rest_api\controllers\model\Read'                                                => [
832
+				'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache,
833
+			],
834
+			'EventEspresso\core\libraries\rest_api\calculations\Datetime'                                                 => [
835
+				'EEM_Datetime'     => EE_Dependency_Map::load_from_cache,
836
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache,
837
+			],
838
+			'EventEspresso\core\libraries\rest_api\calculations\Event'                                                    => [
839
+				'EEM_Event'        => EE_Dependency_Map::load_from_cache,
840
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache,
841
+			],
842
+			'EventEspresso\core\libraries\rest_api\calculations\Registration'                                             => [
843
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache,
844
+			],
845
+			'EventEspresso\core\services\session\SessionStartHandler'                                                     => [
846
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
847
+			],
848
+			'EE_URL_Validation_Strategy'                                                                                  => [
849
+				null,
850
+				null,
851
+				'EventEspresso\core\services\validators\URLValidator' => EE_Dependency_Map::load_from_cache,
852
+			],
853
+			'EventEspresso\admin_pages\general_settings\OrganizationSettings'                                             => [
854
+				'EE_Registry'                                             => EE_Dependency_Map::load_from_cache,
855
+				'EE_Organization_Config'                                  => EE_Dependency_Map::load_from_cache,
856
+				'EE_Core_Config'                                          => EE_Dependency_Map::load_from_cache,
857
+				'EE_Network_Core_Config'                                  => EE_Dependency_Map::load_from_cache,
858
+				'EventEspresso\core\services\address\CountrySubRegionDao' => EE_Dependency_Map::load_from_cache,
859
+			],
860
+			'EventEspresso\core\services\address\CountrySubRegionDao'                                                     => [
861
+				'EEM_State'                                            => EE_Dependency_Map::load_from_cache,
862
+				'EventEspresso\core\services\validators\JsonValidator' => EE_Dependency_Map::load_from_cache,
863
+			],
864
+			'EventEspresso\core\domain\services\admin\ajax\WordpressHeartbeat'                                            => [
865
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
866
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
867
+			],
868
+			'EventEspresso\core\domain\services\admin\ajax\EventEditorHeartbeat'                                          => [
869
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
870
+				'EE_Environment_Config'            => EE_Dependency_Map::load_from_cache,
871
+			],
872
+			'EventEspresso\core\services\request\files\FilesDataHandler'                                                  => [
873
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
874
+			],
875
+			'EventEspressoBatchRequest\BatchRequestProcessor'                                                             => [
876
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
877
+			],
878
+			'EventEspresso\core\domain\services\admin\registrations\list_table\QueryBuilder'                              => [
879
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
880
+				'EEM_Registration'                            => EE_Dependency_Map::load_from_cache,
881
+				null,
882
+			],
883
+			'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\AttendeeFilterHeader'          => [
884
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
885
+				'EEM_Attendee'                                => EE_Dependency_Map::load_from_cache,
886
+			],
887
+			'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\DateFilterHeader'              => [
888
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
889
+				'EEM_Datetime'                                => EE_Dependency_Map::load_from_cache,
890
+			],
891
+			'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\EventFilterHeader'             => [
892
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
893
+				'EEM_Event'                                   => EE_Dependency_Map::load_from_cache,
894
+			],
895
+			'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\TicketFilterHeader'            => [
896
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
897
+				'EEM_Ticket'                                  => EE_Dependency_Map::load_from_cache,
898
+			],
899
+			'EventEspressoBatchRequest\JobHandlers\ExecuteBatchDeletion'                                                  => [
900
+				'EventEspresso\core\services\orm\tree_traversal\NodeGroupDao' => EE_Dependency_Map::load_from_cache,
901
+			],
902
+			'EventEspressoBatchRequest\JobHandlers\PreviewEventDeletion'                                                  => [
903
+				'EventEspresso\core\services\orm\tree_traversal\NodeGroupDao' => EE_Dependency_Map::load_from_cache,
904
+			],
905
+			'EventEspresso\core\domain\services\admin\events\data\PreviewDeletion'                                        => [
906
+				'EventEspresso\core\services\orm\tree_traversal\NodeGroupDao' => EE_Dependency_Map::load_from_cache,
907
+				'EEM_Event'                                                   => EE_Dependency_Map::load_from_cache,
908
+				'EEM_Datetime'                                                => EE_Dependency_Map::load_from_cache,
909
+				'EEM_Registration'                                            => EE_Dependency_Map::load_from_cache,
910
+			],
911
+			'EventEspresso\core\domain\services\admin\events\data\ConfirmDeletion'                                        => [
912
+				'EventEspresso\core\services\orm\tree_traversal\NodeGroupDao' => EE_Dependency_Map::load_from_cache,
913
+			],
914
+			'EventEspresso\core\services\request\CurrentPage'                                                             => [
915
+				'EE_CPT_Strategy'                             => EE_Dependency_Map::load_from_cache,
916
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
917
+			],
918
+			'EventEspresso\core\services\shortcodes\LegacyShortcodesManager'                                              => [
919
+				'EE_Registry'                                     => EE_Dependency_Map::load_from_cache,
920
+				'EventEspresso\core\services\request\CurrentPage' => EE_Dependency_Map::load_from_cache,
921
+			],
922
+			'EventEspresso\core\services\shortcodes\ShortcodesManager'                                                    => [
923
+				'EventEspresso\core\services\shortcodes\LegacyShortcodesManager' => EE_Dependency_Map::load_from_cache,
924
+				'EventEspresso\core\services\request\CurrentPage'                => EE_Dependency_Map::load_from_cache,
925
+			],
926
+		];
927
+	}
928
+
929
+
930
+	/**
931
+	 * Registers how core classes are loaded.
932
+	 * This can either be done by simply providing the name of one of the EE_Registry loader methods such as:
933
+	 *        'EE_Request_Handler' => 'load_core'
934
+	 *        'EE_Messages_Queue'  => 'load_lib'
935
+	 *        'EEH_Debug_Tools'    => 'load_helper'
936
+	 * or, if greater control is required, by providing a custom closure. For example:
937
+	 *        'Some_Class' => function () {
938
+	 *            return new Some_Class();
939
+	 *        },
940
+	 * This is required for instantiating dependencies
941
+	 * where an interface has been type hinted in a class constructor. For example:
942
+	 *        'Required_Interface' => function () {
943
+	 *            return new A_Class_That_Implements_Required_Interface();
944
+	 *        },
945
+	 */
946
+	protected function _register_core_class_loaders()
947
+	{
948
+		$this->_class_loaders = [
949
+			// load_core
950
+			'EE_Dependency_Map'                            => function () {
951
+				return $this;
952
+			},
953
+			'EE_Capabilities'                              => 'load_core',
954
+			'EE_Encryption'                                => 'load_core',
955
+			'EE_Front_Controller'                          => 'load_core',
956
+			'EE_Module_Request_Router'                     => 'load_core',
957
+			'EE_Registry'                                  => 'load_core',
958
+			'EE_Request'                                   => function () {
959
+				return $this->legacy_request;
960
+			},
961
+			'EventEspresso\core\services\request\Request'  => function () {
962
+				return $this->request;
963
+			},
964
+			'EventEspresso\core\services\request\Response' => function () {
965
+				return $this->response;
966
+			},
967
+			'EE_Base'                                      => 'load_core',
968
+			'EE_Request_Handler'                           => 'load_core',
969
+			'EE_Session'                                   => 'load_core',
970
+			'EE_Cron_Tasks'                                => 'load_core',
971
+			'EE_System'                                    => 'load_core',
972
+			'EE_Maintenance_Mode'                          => 'load_core',
973
+			'EE_Register_CPTs'                             => 'load_core',
974
+			'EE_Admin'                                     => 'load_core',
975
+			'EE_CPT_Strategy'                              => 'load_core',
976
+			// load_class
977
+			'EE_Registration_Processor'                    => 'load_class',
978
+			// load_lib
979
+			'EE_Message_Resource_Manager'                  => 'load_lib',
980
+			'EE_Message_Type_Collection'                   => 'load_lib',
981
+			'EE_Message_Type_Collection_Loader'            => 'load_lib',
982
+			'EE_Messenger_Collection'                      => 'load_lib',
983
+			'EE_Messenger_Collection_Loader'               => 'load_lib',
984
+			'EE_Messages_Processor'                        => 'load_lib',
985
+			'EE_Message_Repository'                        => 'load_lib',
986
+			'EE_Messages_Queue'                            => 'load_lib',
987
+			'EE_Messages_Data_Handler_Collection'          => 'load_lib',
988
+			'EE_Message_Template_Group_Collection'         => 'load_lib',
989
+			'EE_Payment_Method_Manager'                    => 'load_lib',
990
+			'EE_DMS_Core_4_1_0'                            => 'load_dms',
991
+			'EE_DMS_Core_4_2_0'                            => 'load_dms',
992
+			'EE_DMS_Core_4_3_0'                            => 'load_dms',
993
+			'EE_DMS_Core_4_5_0'                            => 'load_dms',
994
+			'EE_DMS_Core_4_6_0'                            => 'load_dms',
995
+			'EE_DMS_Core_4_7_0'                            => 'load_dms',
996
+			'EE_DMS_Core_4_8_0'                            => 'load_dms',
997
+			'EE_DMS_Core_4_9_0'                            => 'load_dms',
998
+			'EE_DMS_Core_4_10_0'                           => 'load_dms',
999
+			'EE_Messages_Generator'                        => function () {
1000
+				return EE_Registry::instance()->load_lib(
1001
+					'Messages_Generator',
1002
+					[],
1003
+					false,
1004
+					false
1005
+				);
1006
+			},
1007
+			'EE_Messages_Template_Defaults'                => function ($arguments = []) {
1008
+				return EE_Registry::instance()->load_lib(
1009
+					'Messages_Template_Defaults',
1010
+					$arguments,
1011
+					false,
1012
+					false
1013
+				);
1014
+			},
1015
+			// load_helper
1016
+			'EEH_Parse_Shortcodes'                         => function () {
1017
+				if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
1018
+					return new EEH_Parse_Shortcodes();
1019
+				}
1020
+				return null;
1021
+			},
1022
+			'EE_Template_Config'                           => function () {
1023
+				return EE_Config::instance()->template_settings;
1024
+			},
1025
+			'EE_Currency_Config'                           => function () {
1026
+				return EE_Config::instance()->currency;
1027
+			},
1028
+			'EE_Registration_Config'                       => function () {
1029
+				return EE_Config::instance()->registration;
1030
+			},
1031
+			'EE_Core_Config'                               => function () {
1032
+				return EE_Config::instance()->core;
1033
+			},
1034
+			'EventEspresso\core\services\loaders\Loader'   => function () {
1035
+				return LoaderFactory::getLoader();
1036
+			},
1037
+			'EE_Network_Config'                            => function () {
1038
+				return EE_Network_Config::instance();
1039
+			},
1040
+			'EE_Config'                                    => function () {
1041
+				return EE_Config::instance();
1042
+			},
1043
+			'EventEspresso\core\domain\Domain'             => function () {
1044
+				return DomainFactory::getEventEspressoCoreDomain();
1045
+			},
1046
+			'EE_Admin_Config'                              => function () {
1047
+				return EE_Config::instance()->admin;
1048
+			},
1049
+			'EE_Organization_Config'                       => function () {
1050
+				return EE_Config::instance()->organization;
1051
+			},
1052
+			'EE_Network_Core_Config'                       => function () {
1053
+				return EE_Network_Config::instance()->core;
1054
+			},
1055
+			'EE_Environment_Config'                        => function () {
1056
+				return EE_Config::instance()->environment;
1057
+			},
1058
+			'EE_Ticket_Selector_Config'                    => function () {
1059
+				return EE_Config::instance()->template_settings->EED_Ticket_Selector;
1060
+			},
1061
+		];
1062
+	}
1063
+
1064
+
1065
+	/**
1066
+	 * can be used for supplying alternate names for classes,
1067
+	 * or for connecting interface names to instantiable classes
1068
+	 */
1069
+	protected function _register_core_aliases()
1070
+	{
1071
+		$aliases = [
1072
+			'CommandBusInterface'                                                          => 'EventEspresso\core\services\commands\CommandBusInterface',
1073
+			'EventEspresso\core\services\commands\CommandBusInterface'                     => 'EventEspresso\core\services\commands\CommandBus',
1074
+			'CommandHandlerManagerInterface'                                               => 'EventEspresso\core\services\commands\CommandHandlerManagerInterface',
1075
+			'EventEspresso\core\services\commands\CommandHandlerManagerInterface'          => 'EventEspresso\core\services\commands\CommandHandlerManager',
1076
+			'CapChecker'                                                                   => 'EventEspresso\core\services\commands\middleware\CapChecker',
1077
+			'AddActionHook'                                                                => 'EventEspresso\core\services\commands\middleware\AddActionHook',
1078
+			'CapabilitiesChecker'                                                          => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1079
+			'CapabilitiesCheckerInterface'                                                 => 'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface',
1080
+			'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface' => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1081
+			'CreateRegistrationService'                                                    => 'EventEspresso\core\domain\services\registration\CreateRegistrationService',
1082
+			'CreateRegistrationCommandHandler'                                             => 'EventEspresso\core\services\commands\registration\CreateRegistrationCommand',
1083
+			'CopyRegistrationDetailsCommandHandler'                                        => 'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommand',
1084
+			'CopyRegistrationPaymentsCommandHandler'                                       => 'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommand',
1085
+			'CancelRegistrationAndTicketLineItemCommandHandler'                            => 'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler',
1086
+			'UpdateRegistrationAndTransactionAfterChangeCommandHandler'                    => 'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler',
1087
+			'CreateTicketLineItemCommandHandler'                                           => 'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommand',
1088
+			'CreateTransactionCommandHandler'                                              => 'EventEspresso\core\services\commands\transaction\CreateTransactionCommandHandler',
1089
+			'CreateAttendeeCommandHandler'                                                 => 'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler',
1090
+			'TableManager'                                                                 => 'EventEspresso\core\services\database\TableManager',
1091
+			'TableAnalysis'                                                                => 'EventEspresso\core\services\database\TableAnalysis',
1092
+			'EspressoShortcode'                                                            => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1093
+			'ShortcodeInterface'                                                           => 'EventEspresso\core\services\shortcodes\ShortcodeInterface',
1094
+			'EventEspresso\core\services\shortcodes\ShortcodeInterface'                    => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1095
+			'EventEspresso\core\services\cache\CacheStorageInterface'                      => 'EventEspresso\core\services\cache\TransientCacheStorage',
1096
+			'LoaderInterface'                                                              => 'EventEspresso\core\services\loaders\LoaderInterface',
1097
+			'EventEspresso\core\services\loaders\LoaderInterface'                          => 'EventEspresso\core\services\loaders\Loader',
1098
+			'CommandFactoryInterface'                                                      => 'EventEspresso\core\services\commands\CommandFactoryInterface',
1099
+			'EventEspresso\core\services\commands\CommandFactoryInterface'                 => 'EventEspresso\core\services\commands\CommandFactory',
1100
+			'EmailValidatorInterface'                                                      => 'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface',
1101
+			'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface'  => 'EventEspresso\core\domain\services\validation\email\EmailValidationService',
1102
+			'NoticeConverterInterface'                                                     => 'EventEspresso\core\services\notices\NoticeConverterInterface',
1103
+			'EventEspresso\core\services\notices\NoticeConverterInterface'                 => 'EventEspresso\core\services\notices\ConvertNoticesToEeErrors',
1104
+			'NoticesContainerInterface'                                                    => 'EventEspresso\core\services\notices\NoticesContainerInterface',
1105
+			'EventEspresso\core\services\notices\NoticesContainerInterface'                => 'EventEspresso\core\services\notices\NoticesContainer',
1106
+			'EventEspresso\core\services\request\RequestInterface'                         => 'EventEspresso\core\services\request\Request',
1107
+			'EventEspresso\core\services\request\ResponseInterface'                        => 'EventEspresso\core\services\request\Response',
1108
+			'EventEspresso\core\domain\DomainInterface'                                    => 'EventEspresso\core\domain\Domain',
1109
+			'Registration_Processor'                                                       => 'EE_Registration_Processor',
1110
+		];
1111
+		foreach ($aliases as $alias => $fqn) {
1112
+			if (is_array($fqn)) {
1113
+				foreach ($fqn as $class => $for_class) {
1114
+					$this->class_cache->addAlias($class, $alias, $for_class);
1115
+				}
1116
+				continue;
1117
+			}
1118
+			$this->class_cache->addAlias($fqn, $alias);
1119
+		}
1120
+		if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
1121
+			$this->class_cache->addAlias(
1122
+				'EventEspresso\core\services\notices\ConvertNoticesToAdminNotices',
1123
+				'EventEspresso\core\services\notices\NoticeConverterInterface'
1124
+			);
1125
+		}
1126
+	}
1127
+
1128
+
1129
+	public function debug($for_class = '')
1130
+	{
1131
+		$this->class_cache->debug($for_class);
1132
+	}
1133
+
1134
+
1135
+	/**
1136
+	 * This is used to reset the internal map and class_loaders to their original default state at the beginning of the
1137
+	 * request Primarily used by unit tests.
1138
+	 */
1139
+	public function reset()
1140
+	{
1141
+		$this->_register_core_class_loaders();
1142
+		$this->_register_core_dependencies();
1143
+	}
1144
+
1145
+
1146
+	/**
1147
+	 * PLZ NOTE: a better name for this method would be is_alias()
1148
+	 * because it returns TRUE if the provided fully qualified name IS an alias
1149
+	 * WHY?
1150
+	 * Because if a class is type hinting for a concretion,
1151
+	 * then why would we need to find another class to supply it?
1152
+	 * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
1153
+	 * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
1154
+	 * Don't go looking for some substitute.
1155
+	 * Whereas if a class is type hinting for an interface...
1156
+	 * then we need to find an actual class to use.
1157
+	 * So the interface IS the alias for some other FQN,
1158
+	 * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
1159
+	 * represents some other class.
1160
+	 *
1161
+	 * @param string $fqn
1162
+	 * @param string $for_class
1163
+	 * @return bool
1164
+	 * @deprecated 4.9.62.p
1165
+	 */
1166
+	public function has_alias($fqn = '', $for_class = '')
1167
+	{
1168
+		return $this->isAlias($fqn, $for_class);
1169
+	}
1170
+
1171
+
1172
+	/**
1173
+	 * PLZ NOTE: a better name for this method would be get_fqn_for_alias()
1174
+	 * because it returns a FQN for provided alias if one exists, otherwise returns the original $alias
1175
+	 * functions recursively, so that multiple aliases can be used to drill down to a FQN
1176
+	 *  for example:
1177
+	 *      if the following two entries were added to the _aliases array:
1178
+	 *          array(
1179
+	 *              'interface_alias'           => 'some\namespace\interface'
1180
+	 *              'some\namespace\interface'  => 'some\namespace\classname'
1181
+	 *          )
1182
+	 *      then one could use EE_Registry::instance()->create( 'interface_alias' )
1183
+	 *      to load an instance of 'some\namespace\classname'
1184
+	 *
1185
+	 * @param string $alias
1186
+	 * @param string $for_class
1187
+	 * @return string
1188
+	 * @deprecated 4.9.62.p
1189
+	 */
1190
+	public function get_alias($alias = '', $for_class = '')
1191
+	{
1192
+		return $this->getFqnForAlias($alias, $for_class);
1193
+	}
1194 1194
 }
Please login to merge, or discard this patch.
core/EE_Request_Handler.core.php 2 patches
Indentation   +269 added lines, -269 removed lines patch added patch discarded remove patch
@@ -17,273 +17,273 @@
 block discarded – undo
17 17
 final class EE_Request_Handler implements InterminableInterface
18 18
 {
19 19
 
20
-    /**
21
-     * @var CurrentPage
22
-     */
23
-    private $current_page;
24
-
25
-    /**
26
-     * @var RequestInterface
27
-     */
28
-    private $request;
29
-
30
-    /**
31
-     * @var ResponseInterface
32
-     */
33
-    private $response;
34
-
35
-    /**
36
-     * whether current request is via AJAX
37
-     *
38
-     * @var boolean
39
-     */
40
-    public $ajax = false;
41
-
42
-    /**
43
-     * whether current request is via AJAX from the frontend of the site
44
-     *
45
-     * @var boolean
46
-     */
47
-    public $front_ajax = false;
48
-
49
-
50
-    /**
51
-     * @param RequestInterface  $request
52
-     * @param ResponseInterface $response
53
-     */
54
-    public function __construct(RequestInterface $request, ResponseInterface $response)
55
-    {
56
-        $this->request      = $request;
57
-        $this->response     = $response;
58
-        $this->ajax         = $this->request->isAjax();
59
-        $this->front_ajax   = $this->request->isFrontAjax();
60
-        do_action('AHEE__EE_Request_Handler__construct__complete');
61
-    }
62
-
63
-
64
-    /**
65
-     * @param WP $WP
66
-     * @return void
67
-     * @deprecated  4.10.14.p
68
-     */
69
-    public function parse_request($WP = null)
70
-    {
71
-    }
72
-
73
-
74
-    private function getCurrentPage()
75
-    {
76
-        if (! $this->current_page instanceof CurrentPage) {
77
-            $this->current_page = LoaderFactory::getLoader()->getShared(CurrentPage::class);
78
-        }
79
-        return $this->current_page;
80
-    }
81
-
82
-
83
-    /**
84
-     * @param WP $WP
85
-     * @return void
86
-     * @deprecated  4.10.14.p
87
-     */
88
-    public function set_request_vars($WP = null)
89
-    {
90
-        $this->getCurrentPage()->parseQueryVars($WP);
91
-    }
92
-
93
-
94
-    /**
95
-     * @param WP $WP
96
-     * @return int
97
-     * @deprecated  4.10.14.p
98
-     */
99
-    public function get_post_id_from_request($WP = null)
100
-    {
101
-        return $this->getCurrentPage()->postId();
102
-    }
103
-
104
-
105
-    /**
106
-     * @param WP $WP
107
-     * @return string
108
-     * @deprecated  4.10.14.p
109
-     */
110
-    public function get_post_name_from_request($WP = null)
111
-    {
112
-        return $this->getCurrentPage()->postName();
113
-    }
114
-
115
-
116
-    /**
117
-     * @param WP $WP
118
-     * @return array
119
-     * @deprecated  4.10.14.p
120
-     */
121
-    public function get_post_type_from_request($WP = null)
122
-    {
123
-        return $this->getCurrentPage()->postType();
124
-    }
125
-
126
-
127
-    /**
128
-     * Just a helper method for getting the url for the displayed page.
129
-     *
130
-     * @param WP $WP
131
-     * @return string
132
-     * @deprecated  4.10.14.p
133
-     */
134
-    public function get_current_page_permalink($WP = null)
135
-    {
136
-        return $this->getCurrentPage()->getPermalink($WP);
137
-    }
138
-
139
-
140
-    /**
141
-     * @return bool
142
-     * @deprecated  4.10.14.p
143
-     */
144
-    public function test_for_espresso_page()
145
-    {
146
-        return $this->getCurrentPage()->isEspressoPage();
147
-    }
148
-
149
-
150
-    /**
151
-     * @param $key
152
-     * @param $value
153
-     * @return void
154
-     * @deprecated  4.10.14.p
155
-     */
156
-    public function set_notice($key, $value)
157
-    {
158
-        $this->response->setNotice($key, $value);
159
-    }
160
-
161
-
162
-    /**
163
-     * @param $key
164
-     * @return mixed
165
-     * @deprecated  4.10.14.p
166
-     */
167
-    public function get_notice($key)
168
-    {
169
-        return $this->response->getNotice($key);
170
-    }
171
-
172
-
173
-    /**
174
-     * @param $string
175
-     * @return void
176
-     * @deprecated  4.10.14.p
177
-     */
178
-    public function add_output($string)
179
-    {
180
-        $this->response->addOutput($string);
181
-    }
182
-
183
-
184
-    /**
185
-     * @return string
186
-     * @deprecated  4.10.14.p
187
-     */
188
-    public function get_output()
189
-    {
190
-        return $this->response->getOutput();
191
-    }
192
-
193
-
194
-    /**
195
-     * @param $item
196
-     * @param $key
197
-     * @deprecated  4.10.14.p
198
-     */
199
-    public function sanitize_text_field_for_array_walk(&$item, &$key)
200
-    {
201
-        $item = strpos($item, 'email') !== false
202
-            ? sanitize_email($item)
203
-            : sanitize_text_field($item);
204
-    }
205
-
206
-
207
-    /**
208
-     * @param null|bool $value
209
-     * @return void
210
-     * @deprecated  4.10.14.p
211
-     */
212
-    public function set_espresso_page($value = null)
213
-    {
214
-        $this->getCurrentPage()->setEspressoPage($value);
215
-    }
216
-
217
-
218
-    /**
219
-     * @return bool
220
-     * @deprecated  4.10.14.p
221
-     */
222
-    public function is_espresso_page()
223
-    {
224
-        return $this->getCurrentPage()->isEspressoPage();
225
-    }
226
-
227
-
228
-    /**
229
-     * returns sanitized contents of $_REQUEST
230
-     *
231
-     * @return array
232
-     * @deprecated  4.10.14.p
233
-     */
234
-    public function params()
235
-    {
236
-        return $this->request->requestParams();
237
-    }
238
-
239
-
240
-    /**
241
-     * @param      $key
242
-     * @param      $value
243
-     * @param bool $override_ee
244
-     * @return    void
245
-     * @deprecated  4.10.14.p
246
-     */
247
-    public function set($key, $value, $override_ee = false)
248
-    {
249
-        $this->request->setRequestParam($key, $value, $override_ee);
250
-    }
251
-
252
-
253
-    /**
254
-     * @param      $key
255
-     * @param null $default
256
-     * @return    mixed
257
-     * @deprecated  4.10.14.p
258
-     */
259
-    public function get($key, $default = null)
260
-    {
261
-        return $this->request->getRequestParam($key, $default);
262
-    }
263
-
264
-
265
-    /**
266
-     * check if param exists
267
-     *
268
-     * @param $key
269
-     * @return    boolean
270
-     * @deprecated  4.10.14.p
271
-     */
272
-    public function is_set($key)
273
-    {
274
-        return $this->request->requestParamIsSet($key);
275
-    }
276
-
277
-
278
-    /**
279
-     * remove param
280
-     *
281
-     * @param $key
282
-     * @return    void
283
-     * @deprecated  4.10.14.p
284
-     */
285
-    public function un_set($key)
286
-    {
287
-        $this->request->unSetRequestParam($key);
288
-    }
20
+	/**
21
+	 * @var CurrentPage
22
+	 */
23
+	private $current_page;
24
+
25
+	/**
26
+	 * @var RequestInterface
27
+	 */
28
+	private $request;
29
+
30
+	/**
31
+	 * @var ResponseInterface
32
+	 */
33
+	private $response;
34
+
35
+	/**
36
+	 * whether current request is via AJAX
37
+	 *
38
+	 * @var boolean
39
+	 */
40
+	public $ajax = false;
41
+
42
+	/**
43
+	 * whether current request is via AJAX from the frontend of the site
44
+	 *
45
+	 * @var boolean
46
+	 */
47
+	public $front_ajax = false;
48
+
49
+
50
+	/**
51
+	 * @param RequestInterface  $request
52
+	 * @param ResponseInterface $response
53
+	 */
54
+	public function __construct(RequestInterface $request, ResponseInterface $response)
55
+	{
56
+		$this->request      = $request;
57
+		$this->response     = $response;
58
+		$this->ajax         = $this->request->isAjax();
59
+		$this->front_ajax   = $this->request->isFrontAjax();
60
+		do_action('AHEE__EE_Request_Handler__construct__complete');
61
+	}
62
+
63
+
64
+	/**
65
+	 * @param WP $WP
66
+	 * @return void
67
+	 * @deprecated  4.10.14.p
68
+	 */
69
+	public function parse_request($WP = null)
70
+	{
71
+	}
72
+
73
+
74
+	private function getCurrentPage()
75
+	{
76
+		if (! $this->current_page instanceof CurrentPage) {
77
+			$this->current_page = LoaderFactory::getLoader()->getShared(CurrentPage::class);
78
+		}
79
+		return $this->current_page;
80
+	}
81
+
82
+
83
+	/**
84
+	 * @param WP $WP
85
+	 * @return void
86
+	 * @deprecated  4.10.14.p
87
+	 */
88
+	public function set_request_vars($WP = null)
89
+	{
90
+		$this->getCurrentPage()->parseQueryVars($WP);
91
+	}
92
+
93
+
94
+	/**
95
+	 * @param WP $WP
96
+	 * @return int
97
+	 * @deprecated  4.10.14.p
98
+	 */
99
+	public function get_post_id_from_request($WP = null)
100
+	{
101
+		return $this->getCurrentPage()->postId();
102
+	}
103
+
104
+
105
+	/**
106
+	 * @param WP $WP
107
+	 * @return string
108
+	 * @deprecated  4.10.14.p
109
+	 */
110
+	public function get_post_name_from_request($WP = null)
111
+	{
112
+		return $this->getCurrentPage()->postName();
113
+	}
114
+
115
+
116
+	/**
117
+	 * @param WP $WP
118
+	 * @return array
119
+	 * @deprecated  4.10.14.p
120
+	 */
121
+	public function get_post_type_from_request($WP = null)
122
+	{
123
+		return $this->getCurrentPage()->postType();
124
+	}
125
+
126
+
127
+	/**
128
+	 * Just a helper method for getting the url for the displayed page.
129
+	 *
130
+	 * @param WP $WP
131
+	 * @return string
132
+	 * @deprecated  4.10.14.p
133
+	 */
134
+	public function get_current_page_permalink($WP = null)
135
+	{
136
+		return $this->getCurrentPage()->getPermalink($WP);
137
+	}
138
+
139
+
140
+	/**
141
+	 * @return bool
142
+	 * @deprecated  4.10.14.p
143
+	 */
144
+	public function test_for_espresso_page()
145
+	{
146
+		return $this->getCurrentPage()->isEspressoPage();
147
+	}
148
+
149
+
150
+	/**
151
+	 * @param $key
152
+	 * @param $value
153
+	 * @return void
154
+	 * @deprecated  4.10.14.p
155
+	 */
156
+	public function set_notice($key, $value)
157
+	{
158
+		$this->response->setNotice($key, $value);
159
+	}
160
+
161
+
162
+	/**
163
+	 * @param $key
164
+	 * @return mixed
165
+	 * @deprecated  4.10.14.p
166
+	 */
167
+	public function get_notice($key)
168
+	{
169
+		return $this->response->getNotice($key);
170
+	}
171
+
172
+
173
+	/**
174
+	 * @param $string
175
+	 * @return void
176
+	 * @deprecated  4.10.14.p
177
+	 */
178
+	public function add_output($string)
179
+	{
180
+		$this->response->addOutput($string);
181
+	}
182
+
183
+
184
+	/**
185
+	 * @return string
186
+	 * @deprecated  4.10.14.p
187
+	 */
188
+	public function get_output()
189
+	{
190
+		return $this->response->getOutput();
191
+	}
192
+
193
+
194
+	/**
195
+	 * @param $item
196
+	 * @param $key
197
+	 * @deprecated  4.10.14.p
198
+	 */
199
+	public function sanitize_text_field_for_array_walk(&$item, &$key)
200
+	{
201
+		$item = strpos($item, 'email') !== false
202
+			? sanitize_email($item)
203
+			: sanitize_text_field($item);
204
+	}
205
+
206
+
207
+	/**
208
+	 * @param null|bool $value
209
+	 * @return void
210
+	 * @deprecated  4.10.14.p
211
+	 */
212
+	public function set_espresso_page($value = null)
213
+	{
214
+		$this->getCurrentPage()->setEspressoPage($value);
215
+	}
216
+
217
+
218
+	/**
219
+	 * @return bool
220
+	 * @deprecated  4.10.14.p
221
+	 */
222
+	public function is_espresso_page()
223
+	{
224
+		return $this->getCurrentPage()->isEspressoPage();
225
+	}
226
+
227
+
228
+	/**
229
+	 * returns sanitized contents of $_REQUEST
230
+	 *
231
+	 * @return array
232
+	 * @deprecated  4.10.14.p
233
+	 */
234
+	public function params()
235
+	{
236
+		return $this->request->requestParams();
237
+	}
238
+
239
+
240
+	/**
241
+	 * @param      $key
242
+	 * @param      $value
243
+	 * @param bool $override_ee
244
+	 * @return    void
245
+	 * @deprecated  4.10.14.p
246
+	 */
247
+	public function set($key, $value, $override_ee = false)
248
+	{
249
+		$this->request->setRequestParam($key, $value, $override_ee);
250
+	}
251
+
252
+
253
+	/**
254
+	 * @param      $key
255
+	 * @param null $default
256
+	 * @return    mixed
257
+	 * @deprecated  4.10.14.p
258
+	 */
259
+	public function get($key, $default = null)
260
+	{
261
+		return $this->request->getRequestParam($key, $default);
262
+	}
263
+
264
+
265
+	/**
266
+	 * check if param exists
267
+	 *
268
+	 * @param $key
269
+	 * @return    boolean
270
+	 * @deprecated  4.10.14.p
271
+	 */
272
+	public function is_set($key)
273
+	{
274
+		return $this->request->requestParamIsSet($key);
275
+	}
276
+
277
+
278
+	/**
279
+	 * remove param
280
+	 *
281
+	 * @param $key
282
+	 * @return    void
283
+	 * @deprecated  4.10.14.p
284
+	 */
285
+	public function un_set($key)
286
+	{
287
+		$this->request->unSetRequestParam($key);
288
+	}
289 289
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 
74 74
     private function getCurrentPage()
75 75
     {
76
-        if (! $this->current_page instanceof CurrentPage) {
76
+        if ( ! $this->current_page instanceof CurrentPage) {
77 77
             $this->current_page = LoaderFactory::getLoader()->getShared(CurrentPage::class);
78 78
         }
79 79
         return $this->current_page;
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.6.2');
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.6.2');
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.10.20.rc.000');
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.10.20.rc.000');
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.