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