Completed
Branch EDTR/master (f9130a)
by
unknown
46:59 queued 38:09
created
domain/services/graphql/connection_resolvers/VenueConnectionResolver.php 1 patch
Indentation   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -17,139 +17,139 @@
 block discarded – undo
17 17
 class VenueConnectionResolver extends AbstractConnectionResolver
18 18
 {
19 19
 
20
-    /**
21
-     * @return EEM_Venue
22
-     * @throws EE_Error
23
-     * @throws InvalidArgumentException
24
-     * @throws InvalidDataTypeException
25
-     * @throws InvalidInterfaceException
26
-     */
27
-    // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
28
-    public function get_query()
29
-    {
30
-        return EEM_Venue::instance();
31
-    }
32
-
33
-
34
-    /**
35
-     * Return an array of items from the query
36
-     *
37
-     * @return array
38
-     */
39
-    // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
40
-    public function get_items()
41
-    {
42
-        $results = $this->query->get_col($this->query_args);
43
-
44
-        return ! empty($results) ? $results : [];
45
-    }
46
-
47
-
48
-    /**
49
-     * Determine whether the Query should execute. If it's determined that the query should
50
-     * not be run based on context such as, but not limited to, who the user is, where in the
51
-     * ResolveTree the Query is, the relation to the node the Query is connected to, etc
52
-     * Return false to prevent the query from executing.
53
-     *
54
-     * @return bool
55
-     */
56
-    // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
57
-    public function should_execute()
58
-    {
59
-        if (false === $this->should_execute) {
60
-            return false;
61
-        }
62
-
63
-        return $this->should_execute;
64
-    }
65
-
66
-
67
-    /**
68
-     * Here, we map the args from the input, then we make sure that we're only querying
69
-     * for IDs. The IDs are then passed down the resolve tree, and deferred resolvers
70
-     * handle batch resolution of the posts.
71
-     *
72
-     * @return array
73
-     */
74
-    // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
75
-    public function get_query_args()
76
-    {
77
-        $query_args = [];
78
-
79
-        /**
80
-         * Prepare for later use
81
-         */
82
-        $last = ! empty($this->args['last']) ? $this->args['last'] : null;
83
-        $first = ! empty($this->args['first']) ? $this->args['first'] : null;
84
-
85
-        /**
86
-         * Set limit the highest value of $first and $last, with a (filterable) max of 100
87
-         */
88
-        $query_args['limit'] = min(
89
-            max(absint($first), absint($last), 10),
90
-            $this->query_amount
91
-        ) + 1;
92
-
93
-        /**
94
-         * Collect the input_fields and sanitize them to prepare them for sending to the Query
95
-         */
96
-        $input_fields = [];
97
-        if (! empty($this->args['where'])) {
98
-            $input_fields = $this->sanitize_input_fields($this->args['where']);
99
-        }
100
-
101
-        /**
102
-         * Determine where we're at in the Graph and adjust the query context appropriately.
103
-         * For example, if we're querying for datetime as a field of event query, this will automatically
104
-         * set the query to pull datetimes that belong to that event.
105
-         * We can set more cases for other source types.
106
-         */
107
-        if (is_object($this->source)) {
108
-            switch (true) {
109
-                // Assumed to be an event
110
-                case $this->source instanceof Post:
111
-                    $query_args[] = ['Event.EVT_ID' => $this->source->ID];
112
-                    break;
113
-                case $this->source instanceof EE_Event:
114
-                    $query_args[] = ['Event.EVT_ID' => $this->source->ID()];
115
-                    break;
116
-            }
117
-        }
118
-
119
-        /**
120
-         * Merge the input_fields with the default query_args
121
-         */
122
-        if (! empty($input_fields)) {
123
-            $query_args = array_merge($query_args, $input_fields);
124
-        }
125
-
126
-        /**
127
-         * Return the $query_args
128
-         */
129
-        return $query_args;
130
-    }
131
-
132
-
133
-    /**
134
-     * This sets up the "allowed" args, and translates the GraphQL-friendly keys to WP_Query
135
-     * friendly keys. There's probably a cleaner/more dynamic way to approach this, but
136
-     * this was quick. I'd be down to explore more dynamic ways to map this, but for
137
-     * now this gets the job done.
138
-     *
139
-     * @param array $query_args
140
-     * @return array
141
-     */
142
-    // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
143
-    public function sanitize_input_fields(array $query_args)
144
-    {
145
-        $arg_mapping = [
146
-            'orderBy' => 'order_by',
147
-            'order'   => 'order',
148
-        ];
149
-
150
-        /**
151
-         * Return the Query Args
152
-         */
153
-        return ! empty($query_args) && is_array($query_args) ? $query_args : [];
154
-    }
20
+	/**
21
+	 * @return EEM_Venue
22
+	 * @throws EE_Error
23
+	 * @throws InvalidArgumentException
24
+	 * @throws InvalidDataTypeException
25
+	 * @throws InvalidInterfaceException
26
+	 */
27
+	// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
28
+	public function get_query()
29
+	{
30
+		return EEM_Venue::instance();
31
+	}
32
+
33
+
34
+	/**
35
+	 * Return an array of items from the query
36
+	 *
37
+	 * @return array
38
+	 */
39
+	// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
40
+	public function get_items()
41
+	{
42
+		$results = $this->query->get_col($this->query_args);
43
+
44
+		return ! empty($results) ? $results : [];
45
+	}
46
+
47
+
48
+	/**
49
+	 * Determine whether the Query should execute. If it's determined that the query should
50
+	 * not be run based on context such as, but not limited to, who the user is, where in the
51
+	 * ResolveTree the Query is, the relation to the node the Query is connected to, etc
52
+	 * Return false to prevent the query from executing.
53
+	 *
54
+	 * @return bool
55
+	 */
56
+	// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
57
+	public function should_execute()
58
+	{
59
+		if (false === $this->should_execute) {
60
+			return false;
61
+		}
62
+
63
+		return $this->should_execute;
64
+	}
65
+
66
+
67
+	/**
68
+	 * Here, we map the args from the input, then we make sure that we're only querying
69
+	 * for IDs. The IDs are then passed down the resolve tree, and deferred resolvers
70
+	 * handle batch resolution of the posts.
71
+	 *
72
+	 * @return array
73
+	 */
74
+	// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
75
+	public function get_query_args()
76
+	{
77
+		$query_args = [];
78
+
79
+		/**
80
+		 * Prepare for later use
81
+		 */
82
+		$last = ! empty($this->args['last']) ? $this->args['last'] : null;
83
+		$first = ! empty($this->args['first']) ? $this->args['first'] : null;
84
+
85
+		/**
86
+		 * Set limit the highest value of $first and $last, with a (filterable) max of 100
87
+		 */
88
+		$query_args['limit'] = min(
89
+			max(absint($first), absint($last), 10),
90
+			$this->query_amount
91
+		) + 1;
92
+
93
+		/**
94
+		 * Collect the input_fields and sanitize them to prepare them for sending to the Query
95
+		 */
96
+		$input_fields = [];
97
+		if (! empty($this->args['where'])) {
98
+			$input_fields = $this->sanitize_input_fields($this->args['where']);
99
+		}
100
+
101
+		/**
102
+		 * Determine where we're at in the Graph and adjust the query context appropriately.
103
+		 * For example, if we're querying for datetime as a field of event query, this will automatically
104
+		 * set the query to pull datetimes that belong to that event.
105
+		 * We can set more cases for other source types.
106
+		 */
107
+		if (is_object($this->source)) {
108
+			switch (true) {
109
+				// Assumed to be an event
110
+				case $this->source instanceof Post:
111
+					$query_args[] = ['Event.EVT_ID' => $this->source->ID];
112
+					break;
113
+				case $this->source instanceof EE_Event:
114
+					$query_args[] = ['Event.EVT_ID' => $this->source->ID()];
115
+					break;
116
+			}
117
+		}
118
+
119
+		/**
120
+		 * Merge the input_fields with the default query_args
121
+		 */
122
+		if (! empty($input_fields)) {
123
+			$query_args = array_merge($query_args, $input_fields);
124
+		}
125
+
126
+		/**
127
+		 * Return the $query_args
128
+		 */
129
+		return $query_args;
130
+	}
131
+
132
+
133
+	/**
134
+	 * This sets up the "allowed" args, and translates the GraphQL-friendly keys to WP_Query
135
+	 * friendly keys. There's probably a cleaner/more dynamic way to approach this, but
136
+	 * this was quick. I'd be down to explore more dynamic ways to map this, but for
137
+	 * now this gets the job done.
138
+	 *
139
+	 * @param array $query_args
140
+	 * @return array
141
+	 */
142
+	// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
143
+	public function sanitize_input_fields(array $query_args)
144
+	{
145
+		$arg_mapping = [
146
+			'orderBy' => 'order_by',
147
+			'order'   => 'order',
148
+		];
149
+
150
+		/**
151
+		 * Return the Query Args
152
+		 */
153
+		return ! empty($query_args) && is_array($query_args) ? $query_args : [];
154
+	}
155 155
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/enums/DatetimesConnectionOrderbyEnum.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -15,32 +15,32 @@
 block discarded – undo
15 15
 class DatetimesConnectionOrderbyEnum extends EnumBase
16 16
 {
17 17
 
18
-    /**
19
-     * DatetimesConnectionOrderbyEnum constructor.
20
-     */
21
-    public function __construct()
22
-    {
23
-        $this->setName('DatetimesConnectionOrderbyEnum');
24
-        $this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
25
-        parent::__construct();
26
-    }
18
+	/**
19
+	 * DatetimesConnectionOrderbyEnum constructor.
20
+	 */
21
+	public function __construct()
22
+	{
23
+		$this->setName('DatetimesConnectionOrderbyEnum');
24
+		$this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
25
+		parent::__construct();
26
+	}
27 27
 
28 28
 
29
-    /**
30
-     * @return array
31
-     * @since $VID:$
32
-     */
33
-    protected function getValues()
34
-    {
35
-        return [
36
-            'NAME'     => [
37
-                'value'       => 'DTT_name',
38
-                'description' => esc_html__('Order by name', 'event_espresso'),
39
-            ],
40
-            'START_DATE'     => [
41
-                'value'       => 'DTT_EVT_start',
42
-                'description' => esc_html__('Order by start date', 'event_espresso'),
43
-            ],
44
-        ];
45
-    }
29
+	/**
30
+	 * @return array
31
+	 * @since $VID:$
32
+	 */
33
+	protected function getValues()
34
+	{
35
+		return [
36
+			'NAME'     => [
37
+				'value'       => 'DTT_name',
38
+				'description' => esc_html__('Order by name', 'event_espresso'),
39
+			],
40
+			'START_DATE'     => [
41
+				'value'       => 'DTT_EVT_start',
42
+				'description' => esc_html__('Order by start date', 'event_espresso'),
43
+			],
44
+		];
45
+	}
46 46
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/enums/TicketsConnectionOrderbyEnum.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -15,32 +15,32 @@
 block discarded – undo
15 15
 class TicketsConnectionOrderbyEnum extends EnumBase
16 16
 {
17 17
 
18
-    /**
19
-     * TicketsConnectionOrderbyEnum constructor.
20
-     */
21
-    public function __construct()
22
-    {
23
-        $this->setName('TicketsConnectionOrderbyEnum');
24
-        $this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
25
-        parent::__construct();
26
-    }
18
+	/**
19
+	 * TicketsConnectionOrderbyEnum constructor.
20
+	 */
21
+	public function __construct()
22
+	{
23
+		$this->setName('TicketsConnectionOrderbyEnum');
24
+		$this->setDescription(esc_html__('Field to order the connection by', 'event_espresso'));
25
+		parent::__construct();
26
+	}
27 27
 
28 28
 
29
-    /**
30
-     * @return array
31
-     * @since $VID:$
32
-     */
33
-    protected function getValues()
34
-    {
35
-        return [
36
-            'NAME'     => [
37
-                'value'       => 'TKT_name',
38
-                'description' => esc_html__('Order by name', 'event_espresso'),
39
-            ],
40
-            'START_DATE'     => [
41
-                'value'       => 'TKT_start_date',
42
-                'description' => esc_html__('Order by start date', 'event_espresso'),
43
-            ],
44
-        ];
45
-    }
29
+	/**
30
+	 * @return array
31
+	 * @since $VID:$
32
+	 */
33
+	protected function getValues()
34
+	{
35
+		return [
36
+			'NAME'     => [
37
+				'value'       => 'TKT_name',
38
+				'description' => esc_html__('Order by name', 'event_espresso'),
39
+			],
40
+			'START_DATE'     => [
41
+				'value'       => 'TKT_start_date',
42
+				'description' => esc_html__('Order by start date', 'event_espresso'),
43
+			],
44
+		];
45
+	}
46 46
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/inputs/DatetimesConnectionOrderbyInput.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -19,32 +19,32 @@
 block discarded – undo
19 19
 class DatetimesConnectionOrderbyInput extends InputBase
20 20
 {
21 21
 
22
-    /**
23
-     * DatetimesConnectionOrderbyInput constructor.
24
-     */
25
-    public function __construct()
26
-    {
27
-        $this->setName('DatetimesConnectionOrderbyInput');
28
-        $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
29
-        parent::__construct();
30
-    }
22
+	/**
23
+	 * DatetimesConnectionOrderbyInput constructor.
24
+	 */
25
+	public function __construct()
26
+	{
27
+		$this->setName('DatetimesConnectionOrderbyInput');
28
+		$this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
29
+		parent::__construct();
30
+	}
31 31
 
32 32
 
33
-    /**
34
-     * @return GraphQLFieldInterface[]
35
-     * @since $VID:$
36
-     */
37
-    protected function getFields()
38
-    {
39
-        return [
40
-            new GraphQLField(
41
-                'field',
42
-                ['non_null' => 'DatetimesConnectionOrderbyEnum']
43
-            ),
44
-            new GraphQLField(
45
-                'order',
46
-                'OrderEnum'
47
-            ),
48
-        ];
49
-    }
33
+	/**
34
+	 * @return GraphQLFieldInterface[]
35
+	 * @since $VID:$
36
+	 */
37
+	protected function getFields()
38
+	{
39
+		return [
40
+			new GraphQLField(
41
+				'field',
42
+				['non_null' => 'DatetimesConnectionOrderbyEnum']
43
+			),
44
+			new GraphQLField(
45
+				'order',
46
+				'OrderEnum'
47
+			),
48
+		];
49
+	}
50 50
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/inputs/TicketsConnectionOrderbyInput.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -19,32 +19,32 @@
 block discarded – undo
19 19
 class TicketsConnectionOrderbyInput extends InputBase
20 20
 {
21 21
 
22
-    /**
23
-     * TicketsConnectionOrderbyInput constructor.
24
-     */
25
-    public function __construct()
26
-    {
27
-        $this->setName('TicketsConnectionOrderbyInput');
28
-        $this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
29
-        parent::__construct();
30
-    }
22
+	/**
23
+	 * TicketsConnectionOrderbyInput constructor.
24
+	 */
25
+	public function __construct()
26
+	{
27
+		$this->setName('TicketsConnectionOrderbyInput');
28
+		$this->setDescription(esc_html__('Options for ordering the connection', 'event_espresso'));
29
+		parent::__construct();
30
+	}
31 31
 
32 32
 
33
-    /**
34
-     * @return GraphQLFieldInterface[]
35
-     * @since $VID:$
36
-     */
37
-    protected function getFields()
38
-    {
39
-        return [
40
-            new GraphQLField(
41
-                'field',
42
-                ['non_null' => 'TicketsConnectionOrderbyEnum']
43
-            ),
44
-            new GraphQLField(
45
-                'order',
46
-                'OrderEnum'
47
-            ),
48
-        ];
49
-    }
33
+	/**
34
+	 * @return GraphQLFieldInterface[]
35
+	 * @since $VID:$
36
+	 */
37
+	protected function getFields()
38
+	{
39
+		return [
40
+			new GraphQLField(
41
+				'field',
42
+				['non_null' => 'TicketsConnectionOrderbyEnum']
43
+			),
44
+			new GraphQLField(
45
+				'order',
46
+				'OrderEnum'
47
+			),
48
+		];
49
+	}
50 50
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/connections/TicketDatetimesConnection.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -20,67 +20,67 @@
 block discarded – undo
20 20
 class TicketDatetimesConnection implements ConnectionInterface
21 21
 {
22 22
 
23
-    /**
24
-     * @var EEM_Datetime $model
25
-     */
26
-    protected $model;
23
+	/**
24
+	 * @var EEM_Datetime $model
25
+	 */
26
+	protected $model;
27 27
 
28 28
 
29
-    /**
30
-     * DatetimeConnection constructor.
31
-     *
32
-     * @param EEM_Datetime $model
33
-     */
34
-    public function __construct(EEM_Datetime $model)
35
-    {
36
-        $this->model = $model;
37
-    }
29
+	/**
30
+	 * DatetimeConnection constructor.
31
+	 *
32
+	 * @param EEM_Datetime $model
33
+	 */
34
+	public function __construct(EEM_Datetime $model)
35
+	{
36
+		$this->model = $model;
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * @return array
42
-     * @since $VID:$
43
-     */
44
-    public function config()
45
-    {
46
-        return [
47
-            'fromType'           => 'Ticket',
48
-            'toType'             => 'Datetime',
49
-            'fromFieldName'      => 'datetimes',
50
-            'connectionTypeName' => 'TicketDatetimesConnection',
51
-            'connectionArgs'     => EventDatetimesConnection::get_connection_args(),
52
-            'resolve'            => [$this, 'resolveConnection'],
53
-            'resolveNode'        => [$this, 'resolveNode'],
54
-        ];
55
-    }
40
+	/**
41
+	 * @return array
42
+	 * @since $VID:$
43
+	 */
44
+	public function config()
45
+	{
46
+		return [
47
+			'fromType'           => 'Ticket',
48
+			'toType'             => 'Datetime',
49
+			'fromFieldName'      => 'datetimes',
50
+			'connectionTypeName' => 'TicketDatetimesConnection',
51
+			'connectionArgs'     => EventDatetimesConnection::get_connection_args(),
52
+			'resolve'            => [$this, 'resolveConnection'],
53
+			'resolveNode'        => [$this, 'resolveNode'],
54
+		];
55
+	}
56 56
 
57 57
 
58
-    /**
59
-     * @param $entity
60
-     * @param $args
61
-     * @param $context
62
-     * @param $info
63
-     * @return array
64
-     * @throws Exception
65
-     * @since $VID:$
66
-     */
67
-    public function resolveConnection($entity, $args, $context, $info)
68
-    {
69
-        $resolver = new DatetimeConnectionResolver($entity, $args, $context, $info);
70
-        return $resolver->get_connection();
71
-    }
58
+	/**
59
+	 * @param $entity
60
+	 * @param $args
61
+	 * @param $context
62
+	 * @param $info
63
+	 * @return array
64
+	 * @throws Exception
65
+	 * @since $VID:$
66
+	 */
67
+	public function resolveConnection($entity, $args, $context, $info)
68
+	{
69
+		$resolver = new DatetimeConnectionResolver($entity, $args, $context, $info);
70
+		return $resolver->get_connection();
71
+	}
72 72
 
73 73
 
74
-    /**
75
-     * @param $id
76
-     * @param $args
77
-     * @param $context
78
-     * @param $info
79
-     * @return EE_Base_Class
80
-     * @since $VID:$
81
-     */
82
-    public function resolveNode($id, $args, $context, $info)
83
-    {
84
-        return $this->model->get_one_by_ID($id);
85
-    }
74
+	/**
75
+	 * @param $id
76
+	 * @param $args
77
+	 * @param $context
78
+	 * @param $info
79
+	 * @return EE_Base_Class
80
+	 * @since $VID:$
81
+	 */
82
+	public function resolveNode($id, $args, $context, $info)
83
+	{
84
+		return $this->model->get_one_by_ID($id);
85
+	}
86 86
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/connections/EventDatetimesConnection.php 1 patch
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -20,109 +20,109 @@
 block discarded – undo
20 20
 class EventDatetimesConnection implements ConnectionInterface
21 21
 {
22 22
 
23
-    /**
24
-     * @var EEM_Datetime $model
25
-     */
26
-    protected $model;
23
+	/**
24
+	 * @var EEM_Datetime $model
25
+	 */
26
+	protected $model;
27 27
 
28 28
 
29
-    /**
30
-     * DatetimeConnection constructor.
31
-     *
32
-     * @param EEM_Datetime               $model
33
-     */
34
-    public function __construct(EEM_Datetime $model)
35
-    {
36
-        $this->model = $model;
37
-    }
29
+	/**
30
+	 * DatetimeConnection constructor.
31
+	 *
32
+	 * @param EEM_Datetime               $model
33
+	 */
34
+	public function __construct(EEM_Datetime $model)
35
+	{
36
+		$this->model = $model;
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * @return array
42
-     * @since $VID:$
43
-     */
44
-    public function config()
45
-    {
46
-        return [
47
-            'fromType'           => 'Event',
48
-            'toType'             => 'Datetime',
49
-            'fromFieldName'      => 'datetimes',
50
-            'connectionTypeName' => 'EventDatetimesConnection',
51
-            'connectionArgs'     => self::get_connection_args(),
52
-            'resolve'            => [$this, 'resolveConnection'],
53
-            'resolveNode'        => [$this, 'resolveNode']
54
-        ];
55
-    }
40
+	/**
41
+	 * @return array
42
+	 * @since $VID:$
43
+	 */
44
+	public function config()
45
+	{
46
+		return [
47
+			'fromType'           => 'Event',
48
+			'toType'             => 'Datetime',
49
+			'fromFieldName'      => 'datetimes',
50
+			'connectionTypeName' => 'EventDatetimesConnection',
51
+			'connectionArgs'     => self::get_connection_args(),
52
+			'resolve'            => [$this, 'resolveConnection'],
53
+			'resolveNode'        => [$this, 'resolveNode']
54
+		];
55
+	}
56 56
 
57 57
 
58
-    /**
59
-     * @param $entity
60
-     * @param $args
61
-     * @param $context
62
-     * @param $info
63
-     * @return array
64
-     * @throws Exception
65
-     * @since $VID:$
66
-     */
67
-    public function resolveConnection($entity, $args, $context, $info)
68
-    {
69
-        $resolver = new DatetimeConnectionResolver($entity, $args, $context, $info);
70
-        return $resolver->get_connection();
71
-    }
58
+	/**
59
+	 * @param $entity
60
+	 * @param $args
61
+	 * @param $context
62
+	 * @param $info
63
+	 * @return array
64
+	 * @throws Exception
65
+	 * @since $VID:$
66
+	 */
67
+	public function resolveConnection($entity, $args, $context, $info)
68
+	{
69
+		$resolver = new DatetimeConnectionResolver($entity, $args, $context, $info);
70
+		return $resolver->get_connection();
71
+	}
72 72
 
73 73
 
74
-    /**
75
-     * @param $id
76
-     * @param $args
77
-     * @param $context
78
-     * @param $info
79
-     * @return EE_Base_Class
80
-     * @since $VID:$
81
-     */
82
-    public function resolveNode($id, $args, $context, $info)
83
-    {
84
-        return $this->model->get_one_by_ID($id);
85
-    }
74
+	/**
75
+	 * @param $id
76
+	 * @param $args
77
+	 * @param $context
78
+	 * @param $info
79
+	 * @return EE_Base_Class
80
+	 * @since $VID:$
81
+	 */
82
+	public function resolveNode($id, $args, $context, $info)
83
+	{
84
+		return $this->model->get_one_by_ID($id);
85
+	}
86 86
 
87
-    /**
88
-     * Given an optional array of args, this returns the args to be used in the connection
89
-     *
90
-     * @access public
91
-     * @param array $args The args to modify the defaults
92
-     *
93
-     * @return array
94
-     */
95
-    // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
96
-    public static function get_connection_args($args = [])
97
-    {
98
-        return array_merge(
99
-            [
100
-                'orderby'      => [
101
-                    'type'        => ['list_of' => 'DatetimesConnectionOrderbyInput'],
102
-                    'description' => esc_html__('What paramater to use to order the objects by.', 'event_espresso'),
103
-                ],
104
-                'eventId'  => [
105
-                    'type'        => 'Int',
106
-                    'description' => esc_html__('Event ID of the datetime.', 'event_espresso'),
107
-                ],
108
-                'ticketId' => [
109
-                    'type'        => 'Int',
110
-                    'description' => esc_html__('Ticket ID of the datetime.', 'event_espresso'),
111
-                ],
112
-                'upcoming' => [
113
-                    'type'        => 'Boolean',
114
-                    'description' => esc_html__('Datetimes which are upcoming.', 'event_espresso'),
115
-                ],
116
-                'active'   => [
117
-                    'type'        => 'Boolean',
118
-                    'description' => esc_html__('Datetimes which are active.', 'event_espresso'),
119
-                ],
120
-                'expired'  => [
121
-                    'type'        => 'Boolean',
122
-                    'description' => esc_html__('Datetimes which are expired.', 'event_espresso'),
123
-                ],
124
-            ],
125
-            $args
126
-        );
127
-    }
87
+	/**
88
+	 * Given an optional array of args, this returns the args to be used in the connection
89
+	 *
90
+	 * @access public
91
+	 * @param array $args The args to modify the defaults
92
+	 *
93
+	 * @return array
94
+	 */
95
+	// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
96
+	public static function get_connection_args($args = [])
97
+	{
98
+		return array_merge(
99
+			[
100
+				'orderby'      => [
101
+					'type'        => ['list_of' => 'DatetimesConnectionOrderbyInput'],
102
+					'description' => esc_html__('What paramater to use to order the objects by.', 'event_espresso'),
103
+				],
104
+				'eventId'  => [
105
+					'type'        => 'Int',
106
+					'description' => esc_html__('Event ID of the datetime.', 'event_espresso'),
107
+				],
108
+				'ticketId' => [
109
+					'type'        => 'Int',
110
+					'description' => esc_html__('Ticket ID of the datetime.', 'event_espresso'),
111
+				],
112
+				'upcoming' => [
113
+					'type'        => 'Boolean',
114
+					'description' => esc_html__('Datetimes which are upcoming.', 'event_espresso'),
115
+				],
116
+				'active'   => [
117
+					'type'        => 'Boolean',
118
+					'description' => esc_html__('Datetimes which are active.', 'event_espresso'),
119
+				],
120
+				'expired'  => [
121
+					'type'        => 'Boolean',
122
+					'description' => esc_html__('Datetimes which are expired.', 'event_espresso'),
123
+				],
124
+			],
125
+			$args
126
+		);
127
+	}
128 128
 }
Please login to merge, or discard this patch.
core/EE_Dependency_Map.core.php 1 patch
Indentation   +1209 added lines, -1209 removed lines patch added patch discarded remove patch
@@ -21,1213 +21,1213 @@
 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
-                array(),
614
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
615
-            ),
616
-            'EventEspresso\core\services\assets\Registry'                                                                 => array(
617
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
618
-                'EventEspresso\core\services\assets\I18nRegistry'    => EE_Dependency_Map::load_from_cache,
619
-            ),
620
-            'EventEspresso\core\domain\entities\shortcodes\EspressoCancelled'                                             => array(
621
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
622
-            ),
623
-            'EventEspresso\core\domain\entities\shortcodes\EspressoCheckout'                                              => array(
624
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
625
-            ),
626
-            'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees'                                        => array(
627
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
628
-            ),
629
-            'EventEspresso\core\domain\entities\shortcodes\EspressoEvents'                                                => array(
630
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
631
-            ),
632
-            'EventEspresso\core\domain\entities\shortcodes\EspressoThankYou'                                              => array(
633
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
634
-            ),
635
-            'EventEspresso\core\domain\entities\shortcodes\EspressoTicketSelector'                                        => array(
636
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
637
-            ),
638
-            'EventEspresso\core\domain\entities\shortcodes\EspressoTxnPage'                                               => array(
639
-                'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
640
-            ),
641
-            'EventEspresso\core\services\cache\BasicCacheManager'                                                         => array(
642
-                'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
643
-            ),
644
-            'EventEspresso\core\services\cache\PostRelatedCacheManager'                                                   => array(
645
-                'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
646
-            ),
647
-            'EventEspresso\core\domain\services\validation\email\EmailValidationService'                                  => array(
648
-                'EE_Registration_Config'                     => EE_Dependency_Map::load_from_cache,
649
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
650
-            ),
651
-            'EventEspresso\core\domain\values\EmailAddress'                                                               => array(
652
-                null,
653
-                'EventEspresso\core\domain\services\validation\email\EmailValidationService' => EE_Dependency_Map::load_from_cache,
654
-            ),
655
-            'EventEspresso\core\services\orm\ModelFieldFactory'                                                           => array(
656
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
657
-            ),
658
-            'LEGACY_MODELS'                                                                                               => array(
659
-                null,
660
-                'EventEspresso\core\services\database\ModelFieldFactory' => EE_Dependency_Map::load_from_cache,
661
-            ),
662
-            'EE_Module_Request_Router'                                                                                    => array(
663
-                'EE_Request' => EE_Dependency_Map::load_from_cache,
664
-            ),
665
-            'EE_Registration_Processor'                                                                                   => array(
666
-                'EE_Request' => EE_Dependency_Map::load_from_cache,
667
-            ),
668
-            'EventEspresso\core\services\notifications\PersistentAdminNoticeManager'                                      => array(
669
-                null,
670
-                'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
671
-                'EventEspresso\core\services\request\Request'                         => EE_Dependency_Map::load_from_cache,
672
-            ),
673
-            'EventEspresso\core\services\licensing\LicenseService'                                                        => array(
674
-                'EventEspresso\core\domain\services\pue\Stats'  => EE_Dependency_Map::load_from_cache,
675
-                'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache,
676
-            ),
677
-            'EE_Admin_Transactions_List_Table'                                                                            => array(
678
-                null,
679
-                'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
680
-            ),
681
-            'EventEspresso\core\domain\services\pue\Stats'                                                                => array(
682
-                'EventEspresso\core\domain\services\pue\Config'        => EE_Dependency_Map::load_from_cache,
683
-                'EE_Maintenance_Mode'                                  => EE_Dependency_Map::load_from_cache,
684
-                'EventEspresso\core\domain\services\pue\StatsGatherer' => EE_Dependency_Map::load_from_cache,
685
-            ),
686
-            'EventEspresso\core\domain\services\pue\Config'                                                               => array(
687
-                'EE_Network_Config' => EE_Dependency_Map::load_from_cache,
688
-                'EE_Config'         => EE_Dependency_Map::load_from_cache,
689
-            ),
690
-            'EventEspresso\core\domain\services\pue\StatsGatherer'                                                        => array(
691
-                'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
692
-                'EEM_Event'          => EE_Dependency_Map::load_from_cache,
693
-                'EEM_Datetime'       => EE_Dependency_Map::load_from_cache,
694
-                'EEM_Ticket'         => EE_Dependency_Map::load_from_cache,
695
-                'EEM_Registration'   => EE_Dependency_Map::load_from_cache,
696
-                'EEM_Transaction'    => EE_Dependency_Map::load_from_cache,
697
-                'EE_Config'          => EE_Dependency_Map::load_from_cache,
698
-            ),
699
-            'EventEspresso\core\domain\services\admin\ExitModal'                                                          => array(
700
-                'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache,
701
-            ),
702
-            'EventEspresso\core\domain\services\admin\PluginUpsells'                                                      => array(
703
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
704
-            ),
705
-            'EventEspresso\caffeinated\modules\recaptcha_invisible\InvisibleRecaptcha'                                    => array(
706
-                'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
707
-                'EE_Session'             => EE_Dependency_Map::load_from_cache,
708
-            ),
709
-            'EventEspresso\caffeinated\modules\recaptcha_invisible\RecaptchaAdminSettings'                                => array(
710
-                'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
711
-            ),
712
-            'EventEspresso\modules\ticket_selector\ProcessTicketSelector'                                                 => array(
713
-                'EE_Core_Config'                                                          => EE_Dependency_Map::load_from_cache,
714
-                'EventEspresso\core\services\request\Request'                             => EE_Dependency_Map::load_from_cache,
715
-                'EE_Session'                                                              => EE_Dependency_Map::load_from_cache,
716
-                'EEM_Ticket'                                                              => EE_Dependency_Map::load_from_cache,
717
-                'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker' => EE_Dependency_Map::load_from_cache,
718
-            ),
719
-            'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker'                                     => array(
720
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
721
-            ),
722
-            'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'                              => array(
723
-                'EE_Core_Config'                             => EE_Dependency_Map::load_from_cache,
724
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
725
-            ),
726
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes'                                => array(
727
-                'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
728
-            ),
729
-            'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomies'                               => array(
730
-                'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
731
-            ),
732
-            'EE_CPT_Strategy'                                                                                             => array(
733
-                'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
734
-                'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
735
-            ),
736
-            'EventEspresso\core\services\loaders\ObjectIdentifier'                                                        => array(
737
-                'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
738
-            ),
739
-            'EventEspresso\core\domain\services\assets\CoreAssetManager'                                                  => array(
740
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
741
-                'EE_Currency_Config'                                 => EE_Dependency_Map::load_from_cache,
742
-                'EE_Template_Config'                                 => EE_Dependency_Map::load_from_cache,
743
-                'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
744
-                'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
745
-            ),
746
-            'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy' => array(
747
-                'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
748
-                'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache
749
-            ),
750
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee' => array(
751
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
752
-            ),
753
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData' => array(
754
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
755
-                'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache
756
-            ),
757
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins' => array(
758
-                'EEM_Checkin' => EE_Dependency_Map::load_from_cache,
759
-            ),
760
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration' => array(
761
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache,
762
-            ),
763
-            'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction' => array(
764
-                'EEM_Transaction' => EE_Dependency_Map::load_from_cache,
765
-            ),
766
-            'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData' => array(
767
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
768
-            ),
769
-            'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers' => array(
770
-                'EEM_Answer' => EE_Dependency_Map::load_from_cache,
771
-                'EEM_Question' => EE_Dependency_Map::load_from_cache,
772
-            ),
773
-            'EventEspresso\core\CPTs\CptQueryModifier' => array(
774
-                null,
775
-                null,
776
-                null,
777
-                'EE_Request_Handler'                          => EE_Dependency_Map::load_from_cache,
778
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
779
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
780
-            ),
781
-            'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler' => array(
782
-                'EE_Registry' => EE_Dependency_Map::load_from_cache,
783
-                'EE_Config' => EE_Dependency_Map::load_from_cache
784
-            ),
785
-            'EventEspresso\core\services\editor\BlockRegistrationManager'                                                 => array(
786
-                'EventEspresso\core\services\assets\BlockAssetManagerCollection' => EE_Dependency_Map::load_from_cache,
787
-                'EventEspresso\core\domain\entities\editor\BlockCollection'      => EE_Dependency_Map::load_from_cache,
788
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => EE_Dependency_Map::load_from_cache,
789
-                'EventEspresso\core\services\request\Request'                    => EE_Dependency_Map::load_from_cache,
790
-            ),
791
-            'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => array(
792
-                'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
793
-                'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
794
-                'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
795
-            ),
796
-            'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer' => array(
797
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
798
-                'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
799
-            ),
800
-            'EventEspresso\core\domain\entities\editor\blocks\EventAttendees' => array(
801
-                'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => self::load_from_cache,
802
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
803
-                'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer' => self::load_from_cache,
804
-            ),
805
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => array(
806
-                'EventEspresso\core\services\container\Mirror' => EE_Dependency_Map::load_from_cache,
807
-                'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
808
-                'EE_Dependency_Map' => EE_Dependency_Map::load_from_cache,
809
-            ),
810
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' => array(
811
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => EE_Dependency_Map::load_from_cache,
812
-                'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
813
-            ),
814
-            'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => array(
815
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationCollection' => EE_Dependency_Map::load_from_cache,
816
-                'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' => EE_Dependency_Map::load_from_cache,
817
-            ),
818
-            'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => array(
819
-                'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache
820
-            ),
821
-            'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => array(
822
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
823
-            ),
824
-            'EventEspresso\core\libraries\rest_api\controllers\model\Read' => array(
825
-                'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache
826
-            ),
827
-            'EventEspresso\core\libraries\rest_api\calculations\Datetime' => array(
828
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
829
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache
830
-            ),
831
-            'EventEspresso\core\libraries\rest_api\calculations\Event' => array(
832
-                'EEM_Event' => EE_Dependency_Map::load_from_cache,
833
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache
834
-            ),
835
-            'EventEspresso\core\libraries\rest_api\calculations\Registration' => array(
836
-                'EEM_Registration' => EE_Dependency_Map::load_from_cache
837
-            ),
838
-            'EventEspresso\core\services\session\SessionStartHandler' => array(
839
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
840
-            ),
841
-            'EE_URL_Validation_Strategy' => array(
842
-                null,
843
-                null,
844
-                'EventEspresso\core\services\validators\URLValidator' => EE_Dependency_Map::load_from_cache
845
-            ),
846
-            'EventEspresso\admin_pages\general_settings\OrganizationSettings' => array(
847
-                'EE_Registry'                                             => EE_Dependency_Map::load_from_cache,
848
-                'EE_Organization_Config'                                  => EE_Dependency_Map::load_from_cache,
849
-                'EE_Core_Config'                                          => EE_Dependency_Map::load_from_cache,
850
-                'EE_Network_Core_Config'                                  => EE_Dependency_Map::load_from_cache,
851
-                'EventEspresso\core\services\address\CountrySubRegionDao' => EE_Dependency_Map::load_from_cache,
852
-            ),
853
-            'EventEspresso\core\services\address\CountrySubRegionDao' => array(
854
-                'EEM_State'                                            => EE_Dependency_Map::load_from_cache,
855
-                'EventEspresso\core\services\validators\JsonValidator' => EE_Dependency_Map::load_from_cache
856
-            ),
857
-            'EventEspresso\core\domain\services\admin\ajax\WordpressHeartbeat' => array(
858
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
859
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
860
-            ),
861
-            'EventEspresso\core\domain\services\admin\ajax\EventEditorHeartbeat' => array(
862
-                'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
863
-                'EE_Environment_Config'            => EE_Dependency_Map::load_from_cache,
864
-            ),
865
-            'EventEspresso\core\services\request\files\FilesDataHandler' => array(
866
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
867
-            ),
868
-            'EventEspressoBatchRequest\BatchRequestProcessor'                              => [
869
-                'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
870
-            ],
871
-            'EventEspresso\core\domain\services\admin\registrations\list_table\QueryBuilder' => [
872
-                null,
873
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
874
-                'EEM_Registration'  => EE_Dependency_Map::load_from_cache,
875
-            ],
876
-            'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\AttendeeFilterHeader' => [
877
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
878
-                'EEM_Attendee'  => EE_Dependency_Map::load_from_cache,
879
-            ],
880
-            'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\DateFilterHeader' => [
881
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
882
-                'EEM_Datetime'  => EE_Dependency_Map::load_from_cache,
883
-            ],
884
-            'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\EventFilterHeader' => [
885
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
886
-                'EEM_Event'  => EE_Dependency_Map::load_from_cache,
887
-            ],
888
-            'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\TicketFilterHeader' => [
889
-                'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
890
-                'EEM_Ticket'  => EE_Dependency_Map::load_from_cache,
891
-            ],
892
-            'EventEspresso\core\domain\services\converters\RestApiSpoofer' => [
893
-                'WP_REST_Server' => EE_Dependency_Map::load_from_cache,
894
-                'EED_Core_Rest_Api' => EE_Dependency_Map::load_from_cache,
895
-                'EventEspresso\core\libraries\rest_api\controllers\model\Read' => EE_Dependency_Map::load_from_cache,
896
-                null
897
-            ],
898
-            'EventEspresso\core\domain\services\admin\events\default_settings\AdvancedEditorAdminFormSection'  => [
899
-                'EE_Admin_Config' => EE_Dependency_Map::load_from_cache
900
-            ],
901
-            'EventEspresso\core\domain\services\admin\events\editor\AdvancedEditorEntityData'  => [
902
-                'EE_Event'        => EE_Dependency_Map::not_registered,
903
-                'EventEspresso\core\domain\services\converters\RestApiSpoofer' => EE_Dependency_Map::load_from_cache,
904
-                'EE_Admin_Config' => EE_Dependency_Map::load_from_cache,
905
-                'EEM_Datetime'    => EE_Dependency_Map::load_from_cache,
906
-                'EEM_Event'       => EE_Dependency_Map::load_from_cache,
907
-                'EEM_Price'       => EE_Dependency_Map::load_from_cache,
908
-                'EEM_Price_Type'  => EE_Dependency_Map::load_from_cache,
909
-                'EEM_Ticket'      => EE_Dependency_Map::load_from_cache,
910
-                'EEM_Venue'       => EE_Dependency_Map::load_from_cache,
911
-            ],
912
-            'EventEspresso\core\services\graphql\GraphQLManager' => [
913
-                'EventEspresso\core\services\graphql\TypesManager'  => EE_Dependency_Map::load_from_cache,
914
-                'EventEspresso\core\services\graphql\InputsManager'  => EE_Dependency_Map::load_from_cache,
915
-                'EventEspresso\core\services\graphql\EnumsManager'  => EE_Dependency_Map::load_from_cache,
916
-                'EventEspresso\core\services\graphql\ConnectionsManager'  => EE_Dependency_Map::load_from_cache,
917
-            ],
918
-            'EventEspresso\core\services\graphql\TypesManager' => [
919
-                'EventEspresso\core\services\graphql\types\TypeCollection' => EE_Dependency_Map::load_from_cache,
920
-            ],
921
-            'EventEspresso\core\services\graphql\InputsManager' => [
922
-                'EventEspresso\core\services\graphql\inputs\InputCollection' => EE_Dependency_Map::load_from_cache,
923
-            ],
924
-            'EventEspresso\core\services\graphql\EnumsManager' => [
925
-                'EventEspresso\core\services\graphql\enums\EnumCollection' => EE_Dependency_Map::load_from_cache,
926
-            ],
927
-            'EventEspresso\core\services\graphql\ConnectionsManager' => [
928
-                'EventEspresso\core\services\graphql\connections\ConnectionCollection' => EE_Dependency_Map::load_from_cache,
929
-            ],
930
-            'EventEspresso\core\domain\services\graphql\types\Datetime' => [
931
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
932
-            ],
933
-            'EventEspresso\core\domain\services\graphql\types\Event' => [
934
-                'EEM_Event' => EE_Dependency_Map::load_from_cache,
935
-            ],
936
-            'EventEspresso\core\domain\services\graphql\types\Ticket' => [
937
-                'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
938
-            ],
939
-            'EventEspresso\core\domain\services\graphql\types\Venue' => [
940
-                'EEM_Venue' => EE_Dependency_Map::load_from_cache,
941
-            ],
942
-            'EventEspresso\core\domain\services\graphql\types\State' => [
943
-                'EEM_State' => EE_Dependency_Map::load_from_cache,
944
-            ],
945
-            'EventEspresso\core\domain\services\graphql\types\Country' => [
946
-                'EEM_Country' => EE_Dependency_Map::load_from_cache,
947
-            ],
948
-            'EventEspresso\core\domain\services\graphql\connections\EventDatetimesConnection' => [
949
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
950
-            ],
951
-            'EventEspresso\core\domain\services\graphql\connections\RootQueryDatetimesConnection' => [
952
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
953
-            ],
954
-            'EventEspresso\core\domain\services\graphql\connections\DatetimeTicketsConnection' => [
955
-                'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
956
-            ],
957
-            'EventEspresso\core\domain\services\graphql\connections\RootQueryTicketsConnection' => [
958
-                'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
959
-            ],
960
-            'EventEspresso\core\domain\services\graphql\connections\TicketDatetimesConnection' => [
961
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
962
-            ],
963
-            'EventEspresso\core\domain\services\graphql\connections\EventVenuesConnection' => [
964
-                'EEM_Venue' => EE_Dependency_Map::load_from_cache,
965
-            ],
966
-        );
967
-    }
968
-
969
-
970
-    /**
971
-     * Registers how core classes are loaded.
972
-     * This can either be done by simply providing the name of one of the EE_Registry loader methods such as:
973
-     *        'EE_Request_Handler' => 'load_core'
974
-     *        'EE_Messages_Queue'  => 'load_lib'
975
-     *        'EEH_Debug_Tools'    => 'load_helper'
976
-     * or, if greater control is required, by providing a custom closure. For example:
977
-     *        'Some_Class' => function () {
978
-     *            return new Some_Class();
979
-     *        },
980
-     * This is required for instantiating dependencies
981
-     * where an interface has been type hinted in a class constructor. For example:
982
-     *        'Required_Interface' => function () {
983
-     *            return new A_Class_That_Implements_Required_Interface();
984
-     *        },
985
-     */
986
-    protected function _register_core_class_loaders()
987
-    {
988
-        $this->_class_loaders = array(
989
-            // load_core
990
-            'EE_Dependency_Map'                            => function () {
991
-                return $this;
992
-            },
993
-            'EE_Capabilities'                              => 'load_core',
994
-            'EE_Encryption'                                => 'load_core',
995
-            'EE_Front_Controller'                          => 'load_core',
996
-            'EE_Module_Request_Router'                     => 'load_core',
997
-            'EE_Registry'                                  => 'load_core',
998
-            'EE_Request'                                   => function () {
999
-                return $this->legacy_request;
1000
-            },
1001
-            'EventEspresso\core\services\request\Request'  => function () {
1002
-                return $this->request;
1003
-            },
1004
-            'EventEspresso\core\services\request\Response' => function () {
1005
-                return $this->response;
1006
-            },
1007
-            'EE_Base'                                      => 'load_core',
1008
-            'EE_Request_Handler'                           => 'load_core',
1009
-            'EE_Session'                                   => 'load_core',
1010
-            'EE_Cron_Tasks'                                => 'load_core',
1011
-            'EE_System'                                    => 'load_core',
1012
-            'EE_Maintenance_Mode'                          => 'load_core',
1013
-            'EE_Register_CPTs'                             => 'load_core',
1014
-            'EE_Admin'                                     => 'load_core',
1015
-            'EE_CPT_Strategy'                              => 'load_core',
1016
-            // load_class
1017
-            'EE_Registration_Processor'                    => 'load_class',
1018
-            // load_lib
1019
-            'EE_Message_Resource_Manager'                  => 'load_lib',
1020
-            'EE_Message_Type_Collection'                   => 'load_lib',
1021
-            'EE_Message_Type_Collection_Loader'            => 'load_lib',
1022
-            'EE_Messenger_Collection'                      => 'load_lib',
1023
-            'EE_Messenger_Collection_Loader'               => 'load_lib',
1024
-            'EE_Messages_Processor'                        => 'load_lib',
1025
-            'EE_Message_Repository'                        => 'load_lib',
1026
-            'EE_Messages_Queue'                            => 'load_lib',
1027
-            'EE_Messages_Data_Handler_Collection'          => 'load_lib',
1028
-            'EE_Message_Template_Group_Collection'         => 'load_lib',
1029
-            'EE_Payment_Method_Manager'                    => 'load_lib',
1030
-            'EE_DMS_Core_4_1_0'                            => 'load_dms',
1031
-            'EE_DMS_Core_4_2_0'                            => 'load_dms',
1032
-            'EE_DMS_Core_4_3_0'                            => 'load_dms',
1033
-            'EE_DMS_Core_4_5_0'                            => 'load_dms',
1034
-            'EE_DMS_Core_4_6_0'                            => 'load_dms',
1035
-            'EE_DMS_Core_4_7_0'                            => 'load_dms',
1036
-            'EE_DMS_Core_4_8_0'                            => 'load_dms',
1037
-            'EE_DMS_Core_4_9_0'                            => 'load_dms',
1038
-            'EE_DMS_Core_4_10_0'                            => 'load_dms',
1039
-            'EE_Messages_Generator'                        => static function () {
1040
-                return EE_Registry::instance()->load_lib(
1041
-                    'Messages_Generator',
1042
-                    array(),
1043
-                    false,
1044
-                    false
1045
-                );
1046
-            },
1047
-            'EE_Messages_Template_Defaults'                => static function ($arguments = array()) {
1048
-                return EE_Registry::instance()->load_lib(
1049
-                    'Messages_Template_Defaults',
1050
-                    $arguments,
1051
-                    false,
1052
-                    false
1053
-                );
1054
-            },
1055
-            // load_helper
1056
-            'EEH_Parse_Shortcodes'                         => static function () {
1057
-                if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
1058
-                    return new EEH_Parse_Shortcodes();
1059
-                }
1060
-                return null;
1061
-            },
1062
-            'EE_Template_Config'                           => static function () {
1063
-                return EE_Config::instance()->template_settings;
1064
-            },
1065
-            'EE_Currency_Config'                           => static function () {
1066
-                return EE_Config::instance()->currency;
1067
-            },
1068
-            'EE_Registration_Config'                       => static function () {
1069
-                return EE_Config::instance()->registration;
1070
-            },
1071
-            'EE_Core_Config'                               => static function () {
1072
-                return EE_Config::instance()->core;
1073
-            },
1074
-            'EventEspresso\core\services\loaders\Loader'   => static function () {
1075
-                return LoaderFactory::getLoader();
1076
-            },
1077
-            'EE_Network_Config'                            => static function () {
1078
-                return EE_Network_Config::instance();
1079
-            },
1080
-            'EE_Config'                                    => static function () {
1081
-                return EE_Config::instance();
1082
-            },
1083
-            'EventEspresso\core\domain\Domain'             => static function () {
1084
-                return DomainFactory::getEventEspressoCoreDomain();
1085
-            },
1086
-            'EE_Admin_Config'                              => static function () {
1087
-                return EE_Config::instance()->admin;
1088
-            },
1089
-            'EE_Organization_Config'                       => static function () {
1090
-                return EE_Config::instance()->organization;
1091
-            },
1092
-            'EE_Network_Core_Config'                       => static function () {
1093
-                return EE_Network_Config::instance()->core;
1094
-            },
1095
-            'EE_Environment_Config'                        => static function () {
1096
-                return EE_Config::instance()->environment;
1097
-            },
1098
-            'EED_Core_Rest_Api'                            => static function () {
1099
-                return EED_Core_Rest_Api::instance();
1100
-            },
1101
-            'WP_REST_Server'                            => static function () {
1102
-                return rest_get_server();
1103
-            },
1104
-        );
1105
-    }
1106
-
1107
-
1108
-    /**
1109
-     * can be used for supplying alternate names for classes,
1110
-     * or for connecting interface names to instantiable classes
1111
-     *
1112
-     * @throws InvalidAliasException
1113
-     */
1114
-    protected function _register_core_aliases()
1115
-    {
1116
-        $aliases = array(
1117
-            'CommandBusInterface'                                                          => 'EventEspresso\core\services\commands\CommandBusInterface',
1118
-            'EventEspresso\core\services\commands\CommandBusInterface'                     => 'EventEspresso\core\services\commands\CommandBus',
1119
-            'CommandHandlerManagerInterface'                                               => 'EventEspresso\core\services\commands\CommandHandlerManagerInterface',
1120
-            'EventEspresso\core\services\commands\CommandHandlerManagerInterface'          => 'EventEspresso\core\services\commands\CommandHandlerManager',
1121
-            'CapChecker'                                                                   => 'EventEspresso\core\services\commands\middleware\CapChecker',
1122
-            'AddActionHook'                                                                => 'EventEspresso\core\services\commands\middleware\AddActionHook',
1123
-            'CapabilitiesChecker'                                                          => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1124
-            'CapabilitiesCheckerInterface'                                                 => 'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface',
1125
-            'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface' => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1126
-            'CreateRegistrationService'                                                    => 'EventEspresso\core\domain\services\registration\CreateRegistrationService',
1127
-            'CreateRegistrationCommandHandler'                                             => 'EventEspresso\core\services\commands\registration\CreateRegistrationCommand',
1128
-            'CopyRegistrationDetailsCommandHandler'                                        => 'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommand',
1129
-            'CopyRegistrationPaymentsCommandHandler'                                       => 'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommand',
1130
-            'CancelRegistrationAndTicketLineItemCommandHandler'                            => 'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler',
1131
-            'UpdateRegistrationAndTransactionAfterChangeCommandHandler'                    => 'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler',
1132
-            'CreateTicketLineItemCommandHandler'                                           => 'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommand',
1133
-            'CreateTransactionCommandHandler'                                              => 'EventEspresso\core\services\commands\transaction\CreateTransactionCommandHandler',
1134
-            'CreateAttendeeCommandHandler'                                                 => 'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler',
1135
-            'TableManager'                                                                 => 'EventEspresso\core\services\database\TableManager',
1136
-            'TableAnalysis'                                                                => 'EventEspresso\core\services\database\TableAnalysis',
1137
-            'EspressoShortcode'                                                            => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1138
-            'ShortcodeInterface'                                                           => 'EventEspresso\core\services\shortcodes\ShortcodeInterface',
1139
-            'EventEspresso\core\services\shortcodes\ShortcodeInterface'                    => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1140
-            'EventEspresso\core\services\cache\CacheStorageInterface'                      => 'EventEspresso\core\services\cache\TransientCacheStorage',
1141
-            'LoaderInterface'                                                              => 'EventEspresso\core\services\loaders\LoaderInterface',
1142
-            'EventEspresso\core\services\loaders\LoaderInterface'                          => 'EventEspresso\core\services\loaders\Loader',
1143
-            'CommandFactoryInterface'                                                      => 'EventEspresso\core\services\commands\CommandFactoryInterface',
1144
-            'EventEspresso\core\services\commands\CommandFactoryInterface'                 => 'EventEspresso\core\services\commands\CommandFactory',
1145
-            'EmailValidatorInterface'                                                      => 'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface',
1146
-            'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface'  => 'EventEspresso\core\domain\services\validation\email\EmailValidationService',
1147
-            'NoticeConverterInterface'                                                     => 'EventEspresso\core\services\notices\NoticeConverterInterface',
1148
-            'EventEspresso\core\services\notices\NoticeConverterInterface'                 => 'EventEspresso\core\services\notices\ConvertNoticesToEeErrors',
1149
-            'NoticesContainerInterface'                                                    => 'EventEspresso\core\services\notices\NoticesContainerInterface',
1150
-            'EventEspresso\core\services\notices\NoticesContainerInterface'                => 'EventEspresso\core\services\notices\NoticesContainer',
1151
-            'EventEspresso\core\services\request\RequestInterface'                         => 'EventEspresso\core\services\request\Request',
1152
-            'EventEspresso\core\services\request\ResponseInterface'                        => 'EventEspresso\core\services\request\Response',
1153
-            'EventEspresso\core\domain\DomainInterface'                                    => 'EventEspresso\core\domain\Domain',
1154
-            'Registration_Processor'                                                       => 'EE_Registration_Processor',
1155
-        );
1156
-        foreach ($aliases as $alias => $fqn) {
1157
-            if (is_array($fqn)) {
1158
-                foreach ($fqn as $class => $for_class) {
1159
-                    $this->class_cache->addAlias($class, $alias, $for_class);
1160
-                }
1161
-                continue;
1162
-            }
1163
-            $this->class_cache->addAlias($fqn, $alias);
1164
-        }
1165
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
1166
-            $this->class_cache->addAlias(
1167
-                'EventEspresso\core\services\notices\ConvertNoticesToAdminNotices',
1168
-                'EventEspresso\core\services\notices\NoticeConverterInterface'
1169
-            );
1170
-        }
1171
-    }
1172
-
1173
-
1174
-    /**
1175
-     * This is used to reset the internal map and class_loaders to their original default state at the beginning of the
1176
-     * request Primarily used by unit tests.
1177
-     */
1178
-    public function reset()
1179
-    {
1180
-        $this->_register_core_class_loaders();
1181
-        $this->_register_core_dependencies();
1182
-    }
1183
-
1184
-
1185
-    /**
1186
-     * PLZ NOTE: a better name for this method would be is_alias()
1187
-     * because it returns TRUE if the provided fully qualified name IS an alias
1188
-     * WHY?
1189
-     * Because if a class is type hinting for a concretion,
1190
-     * then why would we need to find another class to supply it?
1191
-     * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
1192
-     * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
1193
-     * Don't go looking for some substitute.
1194
-     * Whereas if a class is type hinting for an interface...
1195
-     * then we need to find an actual class to use.
1196
-     * So the interface IS the alias for some other FQN,
1197
-     * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
1198
-     * represents some other class.
1199
-     *
1200
-     * @deprecated 4.9.62.p
1201
-     * @param string $fqn
1202
-     * @param string $for_class
1203
-     * @return bool
1204
-     */
1205
-    public function has_alias($fqn = '', $for_class = '')
1206
-    {
1207
-        return $this->isAlias($fqn, $for_class);
1208
-    }
1209
-
1210
-
1211
-    /**
1212
-     * PLZ NOTE: a better name for this method would be get_fqn_for_alias()
1213
-     * because it returns a FQN for provided alias if one exists, otherwise returns the original $alias
1214
-     * functions recursively, so that multiple aliases can be used to drill down to a FQN
1215
-     *  for example:
1216
-     *      if the following two entries were added to the _aliases array:
1217
-     *          array(
1218
-     *              'interface_alias'           => 'some\namespace\interface'
1219
-     *              'some\namespace\interface'  => 'some\namespace\classname'
1220
-     *          )
1221
-     *      then one could use EE_Registry::instance()->create( 'interface_alias' )
1222
-     *      to load an instance of 'some\namespace\classname'
1223
-     *
1224
-     * @deprecated 4.9.62.p
1225
-     * @param string $alias
1226
-     * @param string $for_class
1227
-     * @return string
1228
-     */
1229
-    public function get_alias($alias = '', $for_class = '')
1230
-    {
1231
-        return $this->getFqnForAlias($alias, $for_class);
1232
-    }
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
+				array(),
614
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
615
+			),
616
+			'EventEspresso\core\services\assets\Registry'                                                                 => array(
617
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
618
+				'EventEspresso\core\services\assets\I18nRegistry'    => EE_Dependency_Map::load_from_cache,
619
+			),
620
+			'EventEspresso\core\domain\entities\shortcodes\EspressoCancelled'                                             => array(
621
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
622
+			),
623
+			'EventEspresso\core\domain\entities\shortcodes\EspressoCheckout'                                              => array(
624
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
625
+			),
626
+			'EventEspresso\core\domain\entities\shortcodes\EspressoEventAttendees'                                        => array(
627
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
628
+			),
629
+			'EventEspresso\core\domain\entities\shortcodes\EspressoEvents'                                                => array(
630
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
631
+			),
632
+			'EventEspresso\core\domain\entities\shortcodes\EspressoThankYou'                                              => array(
633
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
634
+			),
635
+			'EventEspresso\core\domain\entities\shortcodes\EspressoTicketSelector'                                        => array(
636
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
637
+			),
638
+			'EventEspresso\core\domain\entities\shortcodes\EspressoTxnPage'                                               => array(
639
+				'EventEspresso\core\services\cache\PostRelatedCacheManager' => EE_Dependency_Map::load_from_cache,
640
+			),
641
+			'EventEspresso\core\services\cache\BasicCacheManager'                                                         => array(
642
+				'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
643
+			),
644
+			'EventEspresso\core\services\cache\PostRelatedCacheManager'                                                   => array(
645
+				'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache,
646
+			),
647
+			'EventEspresso\core\domain\services\validation\email\EmailValidationService'                                  => array(
648
+				'EE_Registration_Config'                     => EE_Dependency_Map::load_from_cache,
649
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
650
+			),
651
+			'EventEspresso\core\domain\values\EmailAddress'                                                               => array(
652
+				null,
653
+				'EventEspresso\core\domain\services\validation\email\EmailValidationService' => EE_Dependency_Map::load_from_cache,
654
+			),
655
+			'EventEspresso\core\services\orm\ModelFieldFactory'                                                           => array(
656
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
657
+			),
658
+			'LEGACY_MODELS'                                                                                               => array(
659
+				null,
660
+				'EventEspresso\core\services\database\ModelFieldFactory' => EE_Dependency_Map::load_from_cache,
661
+			),
662
+			'EE_Module_Request_Router'                                                                                    => array(
663
+				'EE_Request' => EE_Dependency_Map::load_from_cache,
664
+			),
665
+			'EE_Registration_Processor'                                                                                   => array(
666
+				'EE_Request' => EE_Dependency_Map::load_from_cache,
667
+			),
668
+			'EventEspresso\core\services\notifications\PersistentAdminNoticeManager'                                      => array(
669
+				null,
670
+				'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker' => EE_Dependency_Map::load_from_cache,
671
+				'EventEspresso\core\services\request\Request'                         => EE_Dependency_Map::load_from_cache,
672
+			),
673
+			'EventEspresso\core\services\licensing\LicenseService'                                                        => array(
674
+				'EventEspresso\core\domain\services\pue\Stats'  => EE_Dependency_Map::load_from_cache,
675
+				'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache,
676
+			),
677
+			'EE_Admin_Transactions_List_Table'                                                                            => array(
678
+				null,
679
+				'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache,
680
+			),
681
+			'EventEspresso\core\domain\services\pue\Stats'                                                                => array(
682
+				'EventEspresso\core\domain\services\pue\Config'        => EE_Dependency_Map::load_from_cache,
683
+				'EE_Maintenance_Mode'                                  => EE_Dependency_Map::load_from_cache,
684
+				'EventEspresso\core\domain\services\pue\StatsGatherer' => EE_Dependency_Map::load_from_cache,
685
+			),
686
+			'EventEspresso\core\domain\services\pue\Config'                                                               => array(
687
+				'EE_Network_Config' => EE_Dependency_Map::load_from_cache,
688
+				'EE_Config'         => EE_Dependency_Map::load_from_cache,
689
+			),
690
+			'EventEspresso\core\domain\services\pue\StatsGatherer'                                                        => array(
691
+				'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
692
+				'EEM_Event'          => EE_Dependency_Map::load_from_cache,
693
+				'EEM_Datetime'       => EE_Dependency_Map::load_from_cache,
694
+				'EEM_Ticket'         => EE_Dependency_Map::load_from_cache,
695
+				'EEM_Registration'   => EE_Dependency_Map::load_from_cache,
696
+				'EEM_Transaction'    => EE_Dependency_Map::load_from_cache,
697
+				'EE_Config'          => EE_Dependency_Map::load_from_cache,
698
+			),
699
+			'EventEspresso\core\domain\services\admin\ExitModal'                                                          => array(
700
+				'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache,
701
+			),
702
+			'EventEspresso\core\domain\services\admin\PluginUpsells'                                                      => array(
703
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
704
+			),
705
+			'EventEspresso\caffeinated\modules\recaptcha_invisible\InvisibleRecaptcha'                                    => array(
706
+				'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
707
+				'EE_Session'             => EE_Dependency_Map::load_from_cache,
708
+			),
709
+			'EventEspresso\caffeinated\modules\recaptcha_invisible\RecaptchaAdminSettings'                                => array(
710
+				'EE_Registration_Config' => EE_Dependency_Map::load_from_cache,
711
+			),
712
+			'EventEspresso\modules\ticket_selector\ProcessTicketSelector'                                                 => array(
713
+				'EE_Core_Config'                                                          => EE_Dependency_Map::load_from_cache,
714
+				'EventEspresso\core\services\request\Request'                             => EE_Dependency_Map::load_from_cache,
715
+				'EE_Session'                                                              => EE_Dependency_Map::load_from_cache,
716
+				'EEM_Ticket'                                                              => EE_Dependency_Map::load_from_cache,
717
+				'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker' => EE_Dependency_Map::load_from_cache,
718
+			),
719
+			'EventEspresso\modules\ticket_selector\TicketDatetimeAvailabilityTracker'                                     => array(
720
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
721
+			),
722
+			'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions'                              => array(
723
+				'EE_Core_Config'                             => EE_Dependency_Map::load_from_cache,
724
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
725
+			),
726
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomPostTypes'                                => array(
727
+				'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
728
+			),
729
+			'EventEspresso\core\domain\services\custom_post_types\RegisterCustomTaxonomies'                               => array(
730
+				'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
731
+			),
732
+			'EE_CPT_Strategy'                                                                                             => array(
733
+				'EventEspresso\core\domain\entities\custom_post_types\CustomPostTypeDefinitions' => EE_Dependency_Map::load_from_cache,
734
+				'EventEspresso\core\domain\entities\custom_post_types\CustomTaxonomyDefinitions' => EE_Dependency_Map::load_from_cache,
735
+			),
736
+			'EventEspresso\core\services\loaders\ObjectIdentifier'                                                        => array(
737
+				'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
738
+			),
739
+			'EventEspresso\core\domain\services\assets\CoreAssetManager'                                                  => array(
740
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
741
+				'EE_Currency_Config'                                 => EE_Dependency_Map::load_from_cache,
742
+				'EE_Template_Config'                                 => EE_Dependency_Map::load_from_cache,
743
+				'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
744
+				'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
745
+			),
746
+			'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy' => array(
747
+				'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache,
748
+				'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache
749
+			),
750
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee' => array(
751
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
752
+			),
753
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData' => array(
754
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
755
+				'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache
756
+			),
757
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins' => array(
758
+				'EEM_Checkin' => EE_Dependency_Map::load_from_cache,
759
+			),
760
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration' => array(
761
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache,
762
+			),
763
+			'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction' => array(
764
+				'EEM_Transaction' => EE_Dependency_Map::load_from_cache,
765
+			),
766
+			'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData' => array(
767
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
768
+			),
769
+			'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers' => array(
770
+				'EEM_Answer' => EE_Dependency_Map::load_from_cache,
771
+				'EEM_Question' => EE_Dependency_Map::load_from_cache,
772
+			),
773
+			'EventEspresso\core\CPTs\CptQueryModifier' => array(
774
+				null,
775
+				null,
776
+				null,
777
+				'EE_Request_Handler'                          => EE_Dependency_Map::load_from_cache,
778
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
779
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
780
+			),
781
+			'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler' => array(
782
+				'EE_Registry' => EE_Dependency_Map::load_from_cache,
783
+				'EE_Config' => EE_Dependency_Map::load_from_cache
784
+			),
785
+			'EventEspresso\core\services\editor\BlockRegistrationManager'                                                 => array(
786
+				'EventEspresso\core\services\assets\BlockAssetManagerCollection' => EE_Dependency_Map::load_from_cache,
787
+				'EventEspresso\core\domain\entities\editor\BlockCollection'      => EE_Dependency_Map::load_from_cache,
788
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => EE_Dependency_Map::load_from_cache,
789
+				'EventEspresso\core\services\request\Request'                    => EE_Dependency_Map::load_from_cache,
790
+			),
791
+			'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => array(
792
+				'EventEspresso\core\domain\Domain'                   => EE_Dependency_Map::load_from_cache,
793
+				'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache,
794
+				'EventEspresso\core\services\assets\Registry'        => EE_Dependency_Map::load_from_cache,
795
+			),
796
+			'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer' => array(
797
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
798
+				'EEM_Attendee' => EE_Dependency_Map::load_from_cache,
799
+			),
800
+			'EventEspresso\core\domain\entities\editor\blocks\EventAttendees' => array(
801
+				'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => self::load_from_cache,
802
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
803
+				'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer' => self::load_from_cache,
804
+			),
805
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => array(
806
+				'EventEspresso\core\services\container\Mirror' => EE_Dependency_Map::load_from_cache,
807
+				'EventEspresso\core\services\loaders\ClassInterfaceCache' => EE_Dependency_Map::load_from_cache,
808
+				'EE_Dependency_Map' => EE_Dependency_Map::load_from_cache,
809
+			),
810
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' => array(
811
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationDependencyResolver' => EE_Dependency_Map::load_from_cache,
812
+				'EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache,
813
+			),
814
+			'EventEspresso\core\services\route_match\RouteMatchSpecificationManager' => array(
815
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationCollection' => EE_Dependency_Map::load_from_cache,
816
+				'EventEspresso\core\services\route_match\RouteMatchSpecificationFactory' => EE_Dependency_Map::load_from_cache,
817
+			),
818
+			'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => array(
819
+				'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache
820
+			),
821
+			'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => array(
822
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
823
+			),
824
+			'EventEspresso\core\libraries\rest_api\controllers\model\Read' => array(
825
+				'EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache
826
+			),
827
+			'EventEspresso\core\libraries\rest_api\calculations\Datetime' => array(
828
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
829
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache
830
+			),
831
+			'EventEspresso\core\libraries\rest_api\calculations\Event' => array(
832
+				'EEM_Event' => EE_Dependency_Map::load_from_cache,
833
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache
834
+			),
835
+			'EventEspresso\core\libraries\rest_api\calculations\Registration' => array(
836
+				'EEM_Registration' => EE_Dependency_Map::load_from_cache
837
+			),
838
+			'EventEspresso\core\services\session\SessionStartHandler' => array(
839
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
840
+			),
841
+			'EE_URL_Validation_Strategy' => array(
842
+				null,
843
+				null,
844
+				'EventEspresso\core\services\validators\URLValidator' => EE_Dependency_Map::load_from_cache
845
+			),
846
+			'EventEspresso\admin_pages\general_settings\OrganizationSettings' => array(
847
+				'EE_Registry'                                             => EE_Dependency_Map::load_from_cache,
848
+				'EE_Organization_Config'                                  => EE_Dependency_Map::load_from_cache,
849
+				'EE_Core_Config'                                          => EE_Dependency_Map::load_from_cache,
850
+				'EE_Network_Core_Config'                                  => EE_Dependency_Map::load_from_cache,
851
+				'EventEspresso\core\services\address\CountrySubRegionDao' => EE_Dependency_Map::load_from_cache,
852
+			),
853
+			'EventEspresso\core\services\address\CountrySubRegionDao' => array(
854
+				'EEM_State'                                            => EE_Dependency_Map::load_from_cache,
855
+				'EventEspresso\core\services\validators\JsonValidator' => EE_Dependency_Map::load_from_cache
856
+			),
857
+			'EventEspresso\core\domain\services\admin\ajax\WordpressHeartbeat' => array(
858
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
859
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
860
+			),
861
+			'EventEspresso\core\domain\services\admin\ajax\EventEditorHeartbeat' => array(
862
+				'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache,
863
+				'EE_Environment_Config'            => EE_Dependency_Map::load_from_cache,
864
+			),
865
+			'EventEspresso\core\services\request\files\FilesDataHandler' => array(
866
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
867
+			),
868
+			'EventEspressoBatchRequest\BatchRequestProcessor'                              => [
869
+				'EventEspresso\core\services\loaders\Loader'  => EE_Dependency_Map::load_from_cache,
870
+			],
871
+			'EventEspresso\core\domain\services\admin\registrations\list_table\QueryBuilder' => [
872
+				null,
873
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
874
+				'EEM_Registration'  => EE_Dependency_Map::load_from_cache,
875
+			],
876
+			'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\AttendeeFilterHeader' => [
877
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
878
+				'EEM_Attendee'  => EE_Dependency_Map::load_from_cache,
879
+			],
880
+			'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\DateFilterHeader' => [
881
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
882
+				'EEM_Datetime'  => EE_Dependency_Map::load_from_cache,
883
+			],
884
+			'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\EventFilterHeader' => [
885
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
886
+				'EEM_Event'  => EE_Dependency_Map::load_from_cache,
887
+			],
888
+			'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\TicketFilterHeader' => [
889
+				'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache,
890
+				'EEM_Ticket'  => EE_Dependency_Map::load_from_cache,
891
+			],
892
+			'EventEspresso\core\domain\services\converters\RestApiSpoofer' => [
893
+				'WP_REST_Server' => EE_Dependency_Map::load_from_cache,
894
+				'EED_Core_Rest_Api' => EE_Dependency_Map::load_from_cache,
895
+				'EventEspresso\core\libraries\rest_api\controllers\model\Read' => EE_Dependency_Map::load_from_cache,
896
+				null
897
+			],
898
+			'EventEspresso\core\domain\services\admin\events\default_settings\AdvancedEditorAdminFormSection'  => [
899
+				'EE_Admin_Config' => EE_Dependency_Map::load_from_cache
900
+			],
901
+			'EventEspresso\core\domain\services\admin\events\editor\AdvancedEditorEntityData'  => [
902
+				'EE_Event'        => EE_Dependency_Map::not_registered,
903
+				'EventEspresso\core\domain\services\converters\RestApiSpoofer' => EE_Dependency_Map::load_from_cache,
904
+				'EE_Admin_Config' => EE_Dependency_Map::load_from_cache,
905
+				'EEM_Datetime'    => EE_Dependency_Map::load_from_cache,
906
+				'EEM_Event'       => EE_Dependency_Map::load_from_cache,
907
+				'EEM_Price'       => EE_Dependency_Map::load_from_cache,
908
+				'EEM_Price_Type'  => EE_Dependency_Map::load_from_cache,
909
+				'EEM_Ticket'      => EE_Dependency_Map::load_from_cache,
910
+				'EEM_Venue'       => EE_Dependency_Map::load_from_cache,
911
+			],
912
+			'EventEspresso\core\services\graphql\GraphQLManager' => [
913
+				'EventEspresso\core\services\graphql\TypesManager'  => EE_Dependency_Map::load_from_cache,
914
+				'EventEspresso\core\services\graphql\InputsManager'  => EE_Dependency_Map::load_from_cache,
915
+				'EventEspresso\core\services\graphql\EnumsManager'  => EE_Dependency_Map::load_from_cache,
916
+				'EventEspresso\core\services\graphql\ConnectionsManager'  => EE_Dependency_Map::load_from_cache,
917
+			],
918
+			'EventEspresso\core\services\graphql\TypesManager' => [
919
+				'EventEspresso\core\services\graphql\types\TypeCollection' => EE_Dependency_Map::load_from_cache,
920
+			],
921
+			'EventEspresso\core\services\graphql\InputsManager' => [
922
+				'EventEspresso\core\services\graphql\inputs\InputCollection' => EE_Dependency_Map::load_from_cache,
923
+			],
924
+			'EventEspresso\core\services\graphql\EnumsManager' => [
925
+				'EventEspresso\core\services\graphql\enums\EnumCollection' => EE_Dependency_Map::load_from_cache,
926
+			],
927
+			'EventEspresso\core\services\graphql\ConnectionsManager' => [
928
+				'EventEspresso\core\services\graphql\connections\ConnectionCollection' => EE_Dependency_Map::load_from_cache,
929
+			],
930
+			'EventEspresso\core\domain\services\graphql\types\Datetime' => [
931
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
932
+			],
933
+			'EventEspresso\core\domain\services\graphql\types\Event' => [
934
+				'EEM_Event' => EE_Dependency_Map::load_from_cache,
935
+			],
936
+			'EventEspresso\core\domain\services\graphql\types\Ticket' => [
937
+				'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
938
+			],
939
+			'EventEspresso\core\domain\services\graphql\types\Venue' => [
940
+				'EEM_Venue' => EE_Dependency_Map::load_from_cache,
941
+			],
942
+			'EventEspresso\core\domain\services\graphql\types\State' => [
943
+				'EEM_State' => EE_Dependency_Map::load_from_cache,
944
+			],
945
+			'EventEspresso\core\domain\services\graphql\types\Country' => [
946
+				'EEM_Country' => EE_Dependency_Map::load_from_cache,
947
+			],
948
+			'EventEspresso\core\domain\services\graphql\connections\EventDatetimesConnection' => [
949
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
950
+			],
951
+			'EventEspresso\core\domain\services\graphql\connections\RootQueryDatetimesConnection' => [
952
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
953
+			],
954
+			'EventEspresso\core\domain\services\graphql\connections\DatetimeTicketsConnection' => [
955
+				'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
956
+			],
957
+			'EventEspresso\core\domain\services\graphql\connections\RootQueryTicketsConnection' => [
958
+				'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
959
+			],
960
+			'EventEspresso\core\domain\services\graphql\connections\TicketDatetimesConnection' => [
961
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
962
+			],
963
+			'EventEspresso\core\domain\services\graphql\connections\EventVenuesConnection' => [
964
+				'EEM_Venue' => EE_Dependency_Map::load_from_cache,
965
+			],
966
+		);
967
+	}
968
+
969
+
970
+	/**
971
+	 * Registers how core classes are loaded.
972
+	 * This can either be done by simply providing the name of one of the EE_Registry loader methods such as:
973
+	 *        'EE_Request_Handler' => 'load_core'
974
+	 *        'EE_Messages_Queue'  => 'load_lib'
975
+	 *        'EEH_Debug_Tools'    => 'load_helper'
976
+	 * or, if greater control is required, by providing a custom closure. For example:
977
+	 *        'Some_Class' => function () {
978
+	 *            return new Some_Class();
979
+	 *        },
980
+	 * This is required for instantiating dependencies
981
+	 * where an interface has been type hinted in a class constructor. For example:
982
+	 *        'Required_Interface' => function () {
983
+	 *            return new A_Class_That_Implements_Required_Interface();
984
+	 *        },
985
+	 */
986
+	protected function _register_core_class_loaders()
987
+	{
988
+		$this->_class_loaders = array(
989
+			// load_core
990
+			'EE_Dependency_Map'                            => function () {
991
+				return $this;
992
+			},
993
+			'EE_Capabilities'                              => 'load_core',
994
+			'EE_Encryption'                                => 'load_core',
995
+			'EE_Front_Controller'                          => 'load_core',
996
+			'EE_Module_Request_Router'                     => 'load_core',
997
+			'EE_Registry'                                  => 'load_core',
998
+			'EE_Request'                                   => function () {
999
+				return $this->legacy_request;
1000
+			},
1001
+			'EventEspresso\core\services\request\Request'  => function () {
1002
+				return $this->request;
1003
+			},
1004
+			'EventEspresso\core\services\request\Response' => function () {
1005
+				return $this->response;
1006
+			},
1007
+			'EE_Base'                                      => 'load_core',
1008
+			'EE_Request_Handler'                           => 'load_core',
1009
+			'EE_Session'                                   => 'load_core',
1010
+			'EE_Cron_Tasks'                                => 'load_core',
1011
+			'EE_System'                                    => 'load_core',
1012
+			'EE_Maintenance_Mode'                          => 'load_core',
1013
+			'EE_Register_CPTs'                             => 'load_core',
1014
+			'EE_Admin'                                     => 'load_core',
1015
+			'EE_CPT_Strategy'                              => 'load_core',
1016
+			// load_class
1017
+			'EE_Registration_Processor'                    => 'load_class',
1018
+			// load_lib
1019
+			'EE_Message_Resource_Manager'                  => 'load_lib',
1020
+			'EE_Message_Type_Collection'                   => 'load_lib',
1021
+			'EE_Message_Type_Collection_Loader'            => 'load_lib',
1022
+			'EE_Messenger_Collection'                      => 'load_lib',
1023
+			'EE_Messenger_Collection_Loader'               => 'load_lib',
1024
+			'EE_Messages_Processor'                        => 'load_lib',
1025
+			'EE_Message_Repository'                        => 'load_lib',
1026
+			'EE_Messages_Queue'                            => 'load_lib',
1027
+			'EE_Messages_Data_Handler_Collection'          => 'load_lib',
1028
+			'EE_Message_Template_Group_Collection'         => 'load_lib',
1029
+			'EE_Payment_Method_Manager'                    => 'load_lib',
1030
+			'EE_DMS_Core_4_1_0'                            => 'load_dms',
1031
+			'EE_DMS_Core_4_2_0'                            => 'load_dms',
1032
+			'EE_DMS_Core_4_3_0'                            => 'load_dms',
1033
+			'EE_DMS_Core_4_5_0'                            => 'load_dms',
1034
+			'EE_DMS_Core_4_6_0'                            => 'load_dms',
1035
+			'EE_DMS_Core_4_7_0'                            => 'load_dms',
1036
+			'EE_DMS_Core_4_8_0'                            => 'load_dms',
1037
+			'EE_DMS_Core_4_9_0'                            => 'load_dms',
1038
+			'EE_DMS_Core_4_10_0'                            => 'load_dms',
1039
+			'EE_Messages_Generator'                        => static function () {
1040
+				return EE_Registry::instance()->load_lib(
1041
+					'Messages_Generator',
1042
+					array(),
1043
+					false,
1044
+					false
1045
+				);
1046
+			},
1047
+			'EE_Messages_Template_Defaults'                => static function ($arguments = array()) {
1048
+				return EE_Registry::instance()->load_lib(
1049
+					'Messages_Template_Defaults',
1050
+					$arguments,
1051
+					false,
1052
+					false
1053
+				);
1054
+			},
1055
+			// load_helper
1056
+			'EEH_Parse_Shortcodes'                         => static function () {
1057
+				if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
1058
+					return new EEH_Parse_Shortcodes();
1059
+				}
1060
+				return null;
1061
+			},
1062
+			'EE_Template_Config'                           => static function () {
1063
+				return EE_Config::instance()->template_settings;
1064
+			},
1065
+			'EE_Currency_Config'                           => static function () {
1066
+				return EE_Config::instance()->currency;
1067
+			},
1068
+			'EE_Registration_Config'                       => static function () {
1069
+				return EE_Config::instance()->registration;
1070
+			},
1071
+			'EE_Core_Config'                               => static function () {
1072
+				return EE_Config::instance()->core;
1073
+			},
1074
+			'EventEspresso\core\services\loaders\Loader'   => static function () {
1075
+				return LoaderFactory::getLoader();
1076
+			},
1077
+			'EE_Network_Config'                            => static function () {
1078
+				return EE_Network_Config::instance();
1079
+			},
1080
+			'EE_Config'                                    => static function () {
1081
+				return EE_Config::instance();
1082
+			},
1083
+			'EventEspresso\core\domain\Domain'             => static function () {
1084
+				return DomainFactory::getEventEspressoCoreDomain();
1085
+			},
1086
+			'EE_Admin_Config'                              => static function () {
1087
+				return EE_Config::instance()->admin;
1088
+			},
1089
+			'EE_Organization_Config'                       => static function () {
1090
+				return EE_Config::instance()->organization;
1091
+			},
1092
+			'EE_Network_Core_Config'                       => static function () {
1093
+				return EE_Network_Config::instance()->core;
1094
+			},
1095
+			'EE_Environment_Config'                        => static function () {
1096
+				return EE_Config::instance()->environment;
1097
+			},
1098
+			'EED_Core_Rest_Api'                            => static function () {
1099
+				return EED_Core_Rest_Api::instance();
1100
+			},
1101
+			'WP_REST_Server'                            => static function () {
1102
+				return rest_get_server();
1103
+			},
1104
+		);
1105
+	}
1106
+
1107
+
1108
+	/**
1109
+	 * can be used for supplying alternate names for classes,
1110
+	 * or for connecting interface names to instantiable classes
1111
+	 *
1112
+	 * @throws InvalidAliasException
1113
+	 */
1114
+	protected function _register_core_aliases()
1115
+	{
1116
+		$aliases = array(
1117
+			'CommandBusInterface'                                                          => 'EventEspresso\core\services\commands\CommandBusInterface',
1118
+			'EventEspresso\core\services\commands\CommandBusInterface'                     => 'EventEspresso\core\services\commands\CommandBus',
1119
+			'CommandHandlerManagerInterface'                                               => 'EventEspresso\core\services\commands\CommandHandlerManagerInterface',
1120
+			'EventEspresso\core\services\commands\CommandHandlerManagerInterface'          => 'EventEspresso\core\services\commands\CommandHandlerManager',
1121
+			'CapChecker'                                                                   => 'EventEspresso\core\services\commands\middleware\CapChecker',
1122
+			'AddActionHook'                                                                => 'EventEspresso\core\services\commands\middleware\AddActionHook',
1123
+			'CapabilitiesChecker'                                                          => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1124
+			'CapabilitiesCheckerInterface'                                                 => 'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface',
1125
+			'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface' => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1126
+			'CreateRegistrationService'                                                    => 'EventEspresso\core\domain\services\registration\CreateRegistrationService',
1127
+			'CreateRegistrationCommandHandler'                                             => 'EventEspresso\core\services\commands\registration\CreateRegistrationCommand',
1128
+			'CopyRegistrationDetailsCommandHandler'                                        => 'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommand',
1129
+			'CopyRegistrationPaymentsCommandHandler'                                       => 'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommand',
1130
+			'CancelRegistrationAndTicketLineItemCommandHandler'                            => 'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler',
1131
+			'UpdateRegistrationAndTransactionAfterChangeCommandHandler'                    => 'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler',
1132
+			'CreateTicketLineItemCommandHandler'                                           => 'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommand',
1133
+			'CreateTransactionCommandHandler'                                              => 'EventEspresso\core\services\commands\transaction\CreateTransactionCommandHandler',
1134
+			'CreateAttendeeCommandHandler'                                                 => 'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler',
1135
+			'TableManager'                                                                 => 'EventEspresso\core\services\database\TableManager',
1136
+			'TableAnalysis'                                                                => 'EventEspresso\core\services\database\TableAnalysis',
1137
+			'EspressoShortcode'                                                            => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1138
+			'ShortcodeInterface'                                                           => 'EventEspresso\core\services\shortcodes\ShortcodeInterface',
1139
+			'EventEspresso\core\services\shortcodes\ShortcodeInterface'                    => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1140
+			'EventEspresso\core\services\cache\CacheStorageInterface'                      => 'EventEspresso\core\services\cache\TransientCacheStorage',
1141
+			'LoaderInterface'                                                              => 'EventEspresso\core\services\loaders\LoaderInterface',
1142
+			'EventEspresso\core\services\loaders\LoaderInterface'                          => 'EventEspresso\core\services\loaders\Loader',
1143
+			'CommandFactoryInterface'                                                      => 'EventEspresso\core\services\commands\CommandFactoryInterface',
1144
+			'EventEspresso\core\services\commands\CommandFactoryInterface'                 => 'EventEspresso\core\services\commands\CommandFactory',
1145
+			'EmailValidatorInterface'                                                      => 'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface',
1146
+			'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface'  => 'EventEspresso\core\domain\services\validation\email\EmailValidationService',
1147
+			'NoticeConverterInterface'                                                     => 'EventEspresso\core\services\notices\NoticeConverterInterface',
1148
+			'EventEspresso\core\services\notices\NoticeConverterInterface'                 => 'EventEspresso\core\services\notices\ConvertNoticesToEeErrors',
1149
+			'NoticesContainerInterface'                                                    => 'EventEspresso\core\services\notices\NoticesContainerInterface',
1150
+			'EventEspresso\core\services\notices\NoticesContainerInterface'                => 'EventEspresso\core\services\notices\NoticesContainer',
1151
+			'EventEspresso\core\services\request\RequestInterface'                         => 'EventEspresso\core\services\request\Request',
1152
+			'EventEspresso\core\services\request\ResponseInterface'                        => 'EventEspresso\core\services\request\Response',
1153
+			'EventEspresso\core\domain\DomainInterface'                                    => 'EventEspresso\core\domain\Domain',
1154
+			'Registration_Processor'                                                       => 'EE_Registration_Processor',
1155
+		);
1156
+		foreach ($aliases as $alias => $fqn) {
1157
+			if (is_array($fqn)) {
1158
+				foreach ($fqn as $class => $for_class) {
1159
+					$this->class_cache->addAlias($class, $alias, $for_class);
1160
+				}
1161
+				continue;
1162
+			}
1163
+			$this->class_cache->addAlias($fqn, $alias);
1164
+		}
1165
+		if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
1166
+			$this->class_cache->addAlias(
1167
+				'EventEspresso\core\services\notices\ConvertNoticesToAdminNotices',
1168
+				'EventEspresso\core\services\notices\NoticeConverterInterface'
1169
+			);
1170
+		}
1171
+	}
1172
+
1173
+
1174
+	/**
1175
+	 * This is used to reset the internal map and class_loaders to their original default state at the beginning of the
1176
+	 * request Primarily used by unit tests.
1177
+	 */
1178
+	public function reset()
1179
+	{
1180
+		$this->_register_core_class_loaders();
1181
+		$this->_register_core_dependencies();
1182
+	}
1183
+
1184
+
1185
+	/**
1186
+	 * PLZ NOTE: a better name for this method would be is_alias()
1187
+	 * because it returns TRUE if the provided fully qualified name IS an alias
1188
+	 * WHY?
1189
+	 * Because if a class is type hinting for a concretion,
1190
+	 * then why would we need to find another class to supply it?
1191
+	 * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
1192
+	 * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
1193
+	 * Don't go looking for some substitute.
1194
+	 * Whereas if a class is type hinting for an interface...
1195
+	 * then we need to find an actual class to use.
1196
+	 * So the interface IS the alias for some other FQN,
1197
+	 * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
1198
+	 * represents some other class.
1199
+	 *
1200
+	 * @deprecated 4.9.62.p
1201
+	 * @param string $fqn
1202
+	 * @param string $for_class
1203
+	 * @return bool
1204
+	 */
1205
+	public function has_alias($fqn = '', $for_class = '')
1206
+	{
1207
+		return $this->isAlias($fqn, $for_class);
1208
+	}
1209
+
1210
+
1211
+	/**
1212
+	 * PLZ NOTE: a better name for this method would be get_fqn_for_alias()
1213
+	 * because it returns a FQN for provided alias if one exists, otherwise returns the original $alias
1214
+	 * functions recursively, so that multiple aliases can be used to drill down to a FQN
1215
+	 *  for example:
1216
+	 *      if the following two entries were added to the _aliases array:
1217
+	 *          array(
1218
+	 *              'interface_alias'           => 'some\namespace\interface'
1219
+	 *              'some\namespace\interface'  => 'some\namespace\classname'
1220
+	 *          )
1221
+	 *      then one could use EE_Registry::instance()->create( 'interface_alias' )
1222
+	 *      to load an instance of 'some\namespace\classname'
1223
+	 *
1224
+	 * @deprecated 4.9.62.p
1225
+	 * @param string $alias
1226
+	 * @param string $for_class
1227
+	 * @return string
1228
+	 */
1229
+	public function get_alias($alias = '', $for_class = '')
1230
+	{
1231
+		return $this->getFqnForAlias($alias, $for_class);
1232
+	}
1233 1233
 }
Please login to merge, or discard this patch.
core/services/graphql/enums/EnumInterface.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -13,21 +13,21 @@
 block discarded – undo
13 13
 interface EnumInterface
14 14
 {
15 15
 
16
-    /**
17
-     * @return string
18
-     */
19
-    public function name();
16
+	/**
17
+	 * @return string
18
+	 */
19
+	public function name();
20 20
 
21 21
 
22
-    /**
23
-     * @return string
24
-     */
25
-    public function description();
22
+	/**
23
+	 * @return string
24
+	 */
25
+	public function description();
26 26
 
27 27
 
28
-    /**
29
-     * @return array
30
-     * @since $VID:$
31
-     */
32
-    public function values();
28
+	/**
29
+	 * @return array
30
+	 * @since $VID:$
31
+	 */
32
+	public function values();
33 33
 }
Please login to merge, or discard this patch.