Completed
Branch EDTR/master (5b52a9)
by
unknown
34:23 queued 25:51
created
core/domain/services/graphql/resolvers/FieldResolver.php 3 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     /**
54 54
      * FieldResolver constructor.
55 55
      *
56
-     * @param mixed $model  The model instance.
56
+     * @param \EEM_Base $model  The model instance.
57 57
      * @param array $fields The fields registered for the type.
58 58
      */
59 59
     public function __construct($model, array $fields)
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     /**
124 124
      * Resolve the global ID
125 125
      *
126
-     * @param mixed     $source
126
+     * @param EE_Base_Class     $source
127 127
      * @return string|null
128 128
      * @throws Exception
129 129
      * @since $VID:$
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
 
139 139
     /**
140
-     * @param mixed     $source
140
+     * @param EE_Base_Class     $source
141 141
      * @param           $args
142 142
      * @param           $context
143 143
      * @return Deferred|null
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 
156 156
     /**
157
-     * @param mixed $source
157
+     * @param EE_Base_Class $source
158 158
      * @return EE_Base_Class|null
159 159
      * @throws EE_Error
160 160
      * @throws InvalidArgumentException
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
 
172 172
     /**
173
-     * @param mixed       $source
173
+     * @param EE_Base_Class       $source
174 174
      * @param             $args
175 175
      * @param             $context
176 176
      * @return Deferred|null
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 
205 205
 
206 206
     /**
207
-     * @param mixed $source The source instance.
207
+     * @param EE_Base_Class $source The source instance.
208 208
      * @return EE_Base_Class|null
209 209
      * @throws EE_Error
210 210
      * @throws InvalidArgumentException
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
 
232 232
     /**
233
-     * @param mixed $source The source instance.
233
+     * @param EE_Base_Class $source The source instance.
234 234
      * @return EE_Base_Class|null
235 235
      * @throws EE_Error
236 236
      * @throws InvalidArgumentException
Please login to merge, or discard this patch.
Indentation   +198 added lines, -198 removed lines patch added patch discarded remove patch
@@ -39,221 +39,221 @@
 block discarded – undo
39 39
 class FieldResolver extends ResolverBase
40 40
 {
41 41
 
42
-    /**
43
-     * @var mixed $model
44
-     */
45
-    protected $model;
42
+	/**
43
+	 * @var mixed $model
44
+	 */
45
+	protected $model;
46 46
 
47
-    /**
48
-     * @var array $fields .
49
-     */
50
-    protected $fields;
47
+	/**
48
+	 * @var array $fields .
49
+	 */
50
+	protected $fields;
51 51
 
52 52
 
53
-    /**
54
-     * FieldResolver constructor.
55
-     *
56
-     * @param mixed $model  The model instance.
57
-     * @param array $fields The fields registered for the type.
58
-     */
59
-    public function __construct($model, array $fields)
60
-    {
61
-        $this->model = $model;
62
-        $this->fields = $fields;
63
-    }
53
+	/**
54
+	 * FieldResolver constructor.
55
+	 *
56
+	 * @param mixed $model  The model instance.
57
+	 * @param array $fields The fields registered for the type.
58
+	 */
59
+	public function __construct($model, array $fields)
60
+	{
61
+		$this->model = $model;
62
+		$this->fields = $fields;
63
+	}
64 64
 
65 65
 
66
-    /**
67
-     * @param mixed       $source  The source that's passed down the GraphQL queries
68
-     * @param array       $args    The inputArgs on the field
69
-     * @param AppContext  $context The AppContext passed down the GraphQL tree
70
-     * @param ResolveInfo $info    The ResolveInfo passed down the GraphQL tree
71
-     * @return string
72
-     * @throws EE_Error
73
-     * @throws Exception
74
-     * @throws InvalidArgumentException
75
-     * @throws InvalidDataTypeException
76
-     * @throws InvalidInterfaceException
77
-     * @throws ReflectionException
78
-     * @throws UserError
79
-     * @throws UnexpectedEntityException
80
-     * @since $VID:$
81
-     */
82
-    public function resolve($source, array $args, AppContext $context, ResolveInfo $info)
83
-    {
84
-        $fieldName = $info->fieldName;
85
-        $field = isset($this->fields[ $fieldName ]) ? $this->fields[ $fieldName ] : null;
86
-        // Field should exist in teh registered fields
87
-        if ($field instanceof GraphQLField) {
88
-            // check if the field should be resolved.
89
-            if (! $field->shouldResolve()) {
90
-                return null;
91
-            }
92
-            // Give priority to the internal resolver.
93
-            if ($field->hasInternalResolver()) {
94
-                return $field->resolve($source, $args, $context, $info);
95
-            }
96
-            if (! ($source instanceof EE_Base_Class)) {
97
-                return null;
98
-            }
99
-            // Check if the field has a key mapped to model.
100
-            if (! empty($field->key())) {
101
-                $value = $source->{$field->key()}();
102
-                return $field->mayBeFormatValue($value);
103
-            }
104
-            switch ($fieldName) {
105
-                case 'id': // the global ID
106
-                    return $this->resolveId($source);
107
-                case 'parent':
108
-                    return $this->resolveParent($source);
109
-                case 'event':
110
-                    return $this->resolveEvent($source, $args, $context);
111
-                case 'wpUser':
112
-                    return $this->resolveWpUser($source, $args, $context);
113
-                case 'state': // Venue
114
-                    return $this->resolveState($source);
115
-                case 'country': // State, Venue
116
-                    return $this->resolveCountry($source);
117
-            }
118
-        }
119
-        return null;
120
-    }
66
+	/**
67
+	 * @param mixed       $source  The source that's passed down the GraphQL queries
68
+	 * @param array       $args    The inputArgs on the field
69
+	 * @param AppContext  $context The AppContext passed down the GraphQL tree
70
+	 * @param ResolveInfo $info    The ResolveInfo passed down the GraphQL tree
71
+	 * @return string
72
+	 * @throws EE_Error
73
+	 * @throws Exception
74
+	 * @throws InvalidArgumentException
75
+	 * @throws InvalidDataTypeException
76
+	 * @throws InvalidInterfaceException
77
+	 * @throws ReflectionException
78
+	 * @throws UserError
79
+	 * @throws UnexpectedEntityException
80
+	 * @since $VID:$
81
+	 */
82
+	public function resolve($source, array $args, AppContext $context, ResolveInfo $info)
83
+	{
84
+		$fieldName = $info->fieldName;
85
+		$field = isset($this->fields[ $fieldName ]) ? $this->fields[ $fieldName ] : null;
86
+		// Field should exist in teh registered fields
87
+		if ($field instanceof GraphQLField) {
88
+			// check if the field should be resolved.
89
+			if (! $field->shouldResolve()) {
90
+				return null;
91
+			}
92
+			// Give priority to the internal resolver.
93
+			if ($field->hasInternalResolver()) {
94
+				return $field->resolve($source, $args, $context, $info);
95
+			}
96
+			if (! ($source instanceof EE_Base_Class)) {
97
+				return null;
98
+			}
99
+			// Check if the field has a key mapped to model.
100
+			if (! empty($field->key())) {
101
+				$value = $source->{$field->key()}();
102
+				return $field->mayBeFormatValue($value);
103
+			}
104
+			switch ($fieldName) {
105
+				case 'id': // the global ID
106
+					return $this->resolveId($source);
107
+				case 'parent':
108
+					return $this->resolveParent($source);
109
+				case 'event':
110
+					return $this->resolveEvent($source, $args, $context);
111
+				case 'wpUser':
112
+					return $this->resolveWpUser($source, $args, $context);
113
+				case 'state': // Venue
114
+					return $this->resolveState($source);
115
+				case 'country': // State, Venue
116
+					return $this->resolveCountry($source);
117
+			}
118
+		}
119
+		return null;
120
+	}
121 121
 
122 122
 
123
-    /**
124
-     * Resolve the global ID
125
-     *
126
-     * @param mixed     $source
127
-     * @return string|null
128
-     * @throws Exception
129
-     * @since $VID:$
130
-     */
131
-    public function resolveId($source)
132
-    {
133
-        $ID = $source instanceof EE_Base_Class ? $source->ID() : 0;
123
+	/**
124
+	 * Resolve the global ID
125
+	 *
126
+	 * @param mixed     $source
127
+	 * @return string|null
128
+	 * @throws Exception
129
+	 * @since $VID:$
130
+	 */
131
+	public function resolveId($source)
132
+	{
133
+		$ID = $source instanceof EE_Base_Class ? $source->ID() : 0;
134 134
 
135
-        return $ID ? Relay::toGlobalId($this->model->item_name(), $ID) : null;
136
-    }
135
+		return $ID ? Relay::toGlobalId($this->model->item_name(), $ID) : null;
136
+	}
137 137
 
138 138
 
139
-    /**
140
-     * @param mixed     $source
141
-     * @param           $args
142
-     * @param           $context
143
-     * @return Deferred|null
144
-     * @throws Exception
145
-     * @since $VID:$
146
-     */
147
-    public function resolveWpUser($source, $args, $context)
148
-    {
149
-        $user_id = $source->wp_user();
150
-        return $user_id
151
-            ? DataSource::resolve_user($user_id, $context)
152
-            : null;
153
-    }
139
+	/**
140
+	 * @param mixed     $source
141
+	 * @param           $args
142
+	 * @param           $context
143
+	 * @return Deferred|null
144
+	 * @throws Exception
145
+	 * @since $VID:$
146
+	 */
147
+	public function resolveWpUser($source, $args, $context)
148
+	{
149
+		$user_id = $source->wp_user();
150
+		return $user_id
151
+			? DataSource::resolve_user($user_id, $context)
152
+			: null;
153
+	}
154 154
 
155 155
 
156
-    /**
157
-     * @param mixed $source
158
-     * @return EE_Base_Class|null
159
-     * @throws EE_Error
160
-     * @throws InvalidArgumentException
161
-     * @throws InvalidDataTypeException
162
-     * @throws InvalidInterfaceException
163
-     * @throws ReflectionException
164
-     * @since $VID:$
165
-     */
166
-    public function resolveParent($source)
167
-    {
168
-        return $this->model->get_one_by_ID($source->parent());
169
-    }
156
+	/**
157
+	 * @param mixed $source
158
+	 * @return EE_Base_Class|null
159
+	 * @throws EE_Error
160
+	 * @throws InvalidArgumentException
161
+	 * @throws InvalidDataTypeException
162
+	 * @throws InvalidInterfaceException
163
+	 * @throws ReflectionException
164
+	 * @since $VID:$
165
+	 */
166
+	public function resolveParent($source)
167
+	{
168
+		return $this->model->get_one_by_ID($source->parent());
169
+	}
170 170
 
171 171
 
172
-    /**
173
-     * @param mixed       $source
174
-     * @param             $args
175
-     * @param             $context
176
-     * @return Deferred|null
177
-     * @throws EE_Error
178
-     * @throws InvalidArgumentException
179
-     * @throws InvalidDataTypeException
180
-     * @throws InvalidInterfaceException
181
-     * @throws ReflectionException
182
-     * @throws UserError
183
-     * @throws UnexpectedEntityException
184
-     * @since $VID:$
185
-     */
186
-    public function resolveEvent($source, $args, $context)
187
-    {
188
-        switch (true) {
189
-            case $source instanceof EE_Datetime:
190
-                $event = $source->event();
191
-                break;
192
-            case $source instanceof EE_Venue:
193
-            case $source instanceof EE_Ticket:
194
-                $event = $source->get_related_event();
195
-                break;
196
-            default:
197
-                $event = null;
198
-                break;
199
-        }
200
-        return $event instanceof EE_Event
201
-            ? DataSource::resolve_post_object($event->ID(), $context)
202
-            : null;
203
-    }
172
+	/**
173
+	 * @param mixed       $source
174
+	 * @param             $args
175
+	 * @param             $context
176
+	 * @return Deferred|null
177
+	 * @throws EE_Error
178
+	 * @throws InvalidArgumentException
179
+	 * @throws InvalidDataTypeException
180
+	 * @throws InvalidInterfaceException
181
+	 * @throws ReflectionException
182
+	 * @throws UserError
183
+	 * @throws UnexpectedEntityException
184
+	 * @since $VID:$
185
+	 */
186
+	public function resolveEvent($source, $args, $context)
187
+	{
188
+		switch (true) {
189
+			case $source instanceof EE_Datetime:
190
+				$event = $source->event();
191
+				break;
192
+			case $source instanceof EE_Venue:
193
+			case $source instanceof EE_Ticket:
194
+				$event = $source->get_related_event();
195
+				break;
196
+			default:
197
+				$event = null;
198
+				break;
199
+		}
200
+		return $event instanceof EE_Event
201
+			? DataSource::resolve_post_object($event->ID(), $context)
202
+			: null;
203
+	}
204 204
 
205 205
 
206
-    /**
207
-     * @param mixed $source The source instance.
208
-     * @return EE_Base_Class|null
209
-     * @throws EE_Error
210
-     * @throws InvalidArgumentException
211
-     * @throws InvalidDataTypeException
212
-     * @throws InvalidInterfaceException
213
-     * @since $VID:$
214
-     */
215
-    public function resolveState($source)
216
-    {
217
-        switch (true) {
218
-            case $source instanceof EE_Attendee:
219
-            case $source instanceof EE_Venue:
220
-                $state_id = $source->state_ID();
221
-                break;
222
-            default:
223
-                $state_id = null;
224
-                break;
225
-        }
226
-        return $state_id
227
-            ? EEM_State::instance()->get_one_by_ID($state_id)
228
-            : null;
229
-    }
206
+	/**
207
+	 * @param mixed $source The source instance.
208
+	 * @return EE_Base_Class|null
209
+	 * @throws EE_Error
210
+	 * @throws InvalidArgumentException
211
+	 * @throws InvalidDataTypeException
212
+	 * @throws InvalidInterfaceException
213
+	 * @since $VID:$
214
+	 */
215
+	public function resolveState($source)
216
+	{
217
+		switch (true) {
218
+			case $source instanceof EE_Attendee:
219
+			case $source instanceof EE_Venue:
220
+				$state_id = $source->state_ID();
221
+				break;
222
+			default:
223
+				$state_id = null;
224
+				break;
225
+		}
226
+		return $state_id
227
+			? EEM_State::instance()->get_one_by_ID($state_id)
228
+			: null;
229
+	}
230 230
 
231 231
 
232
-    /**
233
-     * @param mixed $source The source instance.
234
-     * @return EE_Base_Class|null
235
-     * @throws EE_Error
236
-     * @throws InvalidArgumentException
237
-     * @throws InvalidDataTypeException
238
-     * @throws InvalidInterfaceException
239
-     * @since $VID:$
240
-     */
241
-    public function resolveCountry($source)
242
-    {
243
-        switch (true) {
244
-            case $source instanceof EE_State:
245
-                $country_iso = $source->country_iso();
246
-                break;
247
-            case $source instanceof EE_Venue:
248
-                $country_iso = $source->country_ID();
249
-                break;
250
-            default:
251
-                $country_iso = null;
252
-                break;
253
-        }
232
+	/**
233
+	 * @param mixed $source The source instance.
234
+	 * @return EE_Base_Class|null
235
+	 * @throws EE_Error
236
+	 * @throws InvalidArgumentException
237
+	 * @throws InvalidDataTypeException
238
+	 * @throws InvalidInterfaceException
239
+	 * @since $VID:$
240
+	 */
241
+	public function resolveCountry($source)
242
+	{
243
+		switch (true) {
244
+			case $source instanceof EE_State:
245
+				$country_iso = $source->country_iso();
246
+				break;
247
+			case $source instanceof EE_Venue:
248
+				$country_iso = $source->country_ID();
249
+				break;
250
+			default:
251
+				$country_iso = null;
252
+				break;
253
+		}
254 254
 
255
-        return $country_iso
256
-            ? EEM_Country::instance()->get_one_by_ID($country_iso)
257
-            : null;
258
-    }
255
+		return $country_iso
256
+			? EEM_Country::instance()->get_one_by_ID($country_iso)
257
+			: null;
258
+	}
259 259
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,22 +82,22 @@
 block discarded – undo
82 82
     public function resolve($source, array $args, AppContext $context, ResolveInfo $info)
83 83
     {
84 84
         $fieldName = $info->fieldName;
85
-        $field = isset($this->fields[ $fieldName ]) ? $this->fields[ $fieldName ] : null;
85
+        $field = isset($this->fields[$fieldName]) ? $this->fields[$fieldName] : null;
86 86
         // Field should exist in teh registered fields
87 87
         if ($field instanceof GraphQLField) {
88 88
             // check if the field should be resolved.
89
-            if (! $field->shouldResolve()) {
89
+            if ( ! $field->shouldResolve()) {
90 90
                 return null;
91 91
             }
92 92
             // Give priority to the internal resolver.
93 93
             if ($field->hasInternalResolver()) {
94 94
                 return $field->resolve($source, $args, $context, $info);
95 95
             }
96
-            if (! ($source instanceof EE_Base_Class)) {
96
+            if ( ! ($source instanceof EE_Base_Class)) {
97 97
                 return null;
98 98
             }
99 99
             // Check if the field has a key mapped to model.
100
-            if (! empty($field->key())) {
100
+            if ( ! empty($field->key())) {
101 101
                 $value = $source->{$field->key()}();
102 102
                 return $field->mayBeFormatValue($value);
103 103
             }
Please login to merge, or discard this patch.
core/domain/services/graphql/types/RootQuery.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
 
47 47
     /**
48
-     * @return GraphQLFieldInterface[]
48
+     * @return GraphQLOutputField[]
49 49
      * @since $VID:$
50 50
      */
51 51
     public function getFields()
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use EventEspresso\core\exceptions\InvalidDataTypeException;
14 14
 use EventEspresso\core\exceptions\InvalidInterfaceException;
15 15
 use EventEspresso\core\exceptions\UnexpectedEntityException;
16
-
17 16
 use EventEspresso\core\services\graphql\fields\GraphQLFieldInterface;
18 17
 use EventEspresso\core\services\graphql\types\TypeBase;
19 18
 use EventEspresso\core\services\graphql\fields\GraphQLOutputField;
Please login to merge, or discard this patch.
Indentation   +151 added lines, -151 removed lines patch added patch discarded remove patch
@@ -33,155 +33,155 @@
 block discarded – undo
33 33
 class RootQuery extends TypeBase
34 34
 {
35 35
 
36
-    /**
37
-     * RootQuery constructor.
38
-     */
39
-    public function __construct()
40
-    {
41
-        $this->setName('RootQuery');
42
-        $this->setIsCustomPostType(true);
43
-        parent::__construct();
44
-    }
45
-
46
-
47
-    /**
48
-     * @return GraphQLFieldInterface[]
49
-     * @since $VID:$
50
-     */
51
-    public function getFields()
52
-    {
53
-        return [
54
-            new GraphQLOutputField(
55
-                'eventRelations',
56
-                'String',
57
-                null,
58
-                esc_html__('JSON encoded relational data of the models', 'event_espresso'),
59
-                null,
60
-                [$this, 'getEventRelationalData'],
61
-                [
62
-                    'eventId' => [
63
-                        'type'        => ['non_null' => 'Int'],
64
-                        'description' => esc_html__('The event ID to get the relational data for.', 'event_espresso'),
65
-                    ],
66
-                ]
67
-            ),
68
-        ];
69
-    }
70
-
71
-
72
-    /**
73
-     * @param mixed       $source  The source that's passed down the GraphQL queries
74
-     * @param array       $args    The inputArgs on the field
75
-     * @param AppContext  $context The AppContext passed down the GraphQL tree
76
-     * @param ResolveInfo $info    The ResolveInfo passed down the GraphQL tree
77
-     * @return string
78
-     * @throws EE_Error
79
-     * @throws Exception
80
-     * @throws InvalidArgumentException
81
-     * @throws InvalidDataTypeException
82
-     * @throws InvalidInterfaceException
83
-     * @throws ReflectionException
84
-     * @throws UserError
85
-     * @throws UnexpectedEntityException
86
-     * @since $VID:$
87
-     */
88
-    public function getEventRelationalData($source, array $args, AppContext $context, ResolveInfo $info)
89
-    {
90
-        /**
91
-         * Throw an exception if there's no event ID
92
-         */
93
-        if (empty($args['eventId']) || ! absint($args['eventId'])) {
94
-            throw new UserError(esc_html__(
95
-                'No event ID was provided to get the relational data for',
96
-                'event_espresso'
97
-            ));
98
-        }
99
-
100
-        $eventId = absint($args['eventId']);
101
-
102
-        $data = [
103
-            'datetimes'  => [],
104
-            'tickets'    => [],
105
-            'prices'     => [],
106
-        ];
107
-
108
-        $eem_datetime   = EEM_Datetime::instance();
109
-        $eem_ticket     = EEM_Ticket::instance();
110
-        $eem_price      = EEM_Price::instance();
111
-        $eem_price_type = EEM_Price_Type::instance();
112
-
113
-        // PROCESS DATETIMES
114
-        $related_models = [
115
-            'tickets' => $eem_ticket,
116
-        ];
117
-        // Get the IDs of event datetimes.
118
-        $datetimeIds = $eem_datetime->get_col([['EVT_ID' => $eventId]]);
119
-        foreach ($datetimeIds as $datetimeId) {
120
-            $GID = self::convertToGlobalId($eem_datetime->item_name(), $datetimeId);
121
-            foreach ($related_models as $key => $model) {
122
-                // Get the IDs of related entities for the datetime ID.
123
-                $Ids = $model->get_col([['Datetime.DTT_ID' => $datetimeId]]);
124
-                if (! empty($Ids)) {
125
-                    $data['datetimes'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
126
-                }
127
-            }
128
-        }
129
-
130
-        // PROCESS TICKETS
131
-        $related_models = [
132
-            'datetimes' => $eem_datetime,
133
-            'prices'    => $eem_price,
134
-        ];
135
-        // Get the IDs of all datetime tickets.
136
-        $ticketIds = $eem_ticket->get_col([['Datetime.DTT_ID' => ['in', $datetimeIds]]]);
137
-        foreach ($ticketIds as $ticketId) {
138
-            $GID = self::convertToGlobalId($eem_ticket->item_name(), $ticketId);
139
-
140
-            foreach ($related_models as $key => $model) {
141
-                // Get the IDs of related entities for the ticket ID.
142
-                $Ids = $model->get_col([['Ticket.TKT_ID' => $ticketId]]);
143
-                if (! empty($Ids)) {
144
-                    $data['tickets'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
145
-                }
146
-            }
147
-        }
148
-
149
-        // PROCESS PRICES
150
-        $related_models = [
151
-            'tickets'    => $eem_ticket,
152
-            'priceTypes' => $eem_price_type,
153
-        ];
154
-        // Get the IDs of all ticket prices.
155
-        $priceIds = $eem_price->get_col([['Ticket.TKT_ID' => ['in', $ticketIds]]]);
156
-        foreach ($priceIds as $priceId) {
157
-            $GID = self::convertToGlobalId($eem_price->item_name(), $priceId);
158
-
159
-            foreach ($related_models as $key => $model) {
160
-                // Get the IDs of related entities for the price ID.
161
-                $Ids = $model->get_col([['Price.PRC_ID' => $priceId]]);
162
-                if (! empty($Ids)) {
163
-                    $data['prices'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
164
-                }
165
-            }
166
-        }
167
-
168
-        return json_encode($data);
169
-    }
170
-
171
-    /**
172
-     * Convert the DB ID into GID
173
-     *
174
-     * @param string    $type
175
-     * @param int|int[] $ID
176
-     * @return mixed
177
-     */
178
-    public static function convertToGlobalId($type, $ID)
179
-    {
180
-        if (is_array($ID)) {
181
-            return array_map(function ($id) use ($type) {
182
-                return self::convertToGlobalId($type, $id);
183
-            }, $ID);
184
-        }
185
-        return Relay::toGlobalId($type, $ID);
186
-    }
36
+	/**
37
+	 * RootQuery constructor.
38
+	 */
39
+	public function __construct()
40
+	{
41
+		$this->setName('RootQuery');
42
+		$this->setIsCustomPostType(true);
43
+		parent::__construct();
44
+	}
45
+
46
+
47
+	/**
48
+	 * @return GraphQLFieldInterface[]
49
+	 * @since $VID:$
50
+	 */
51
+	public function getFields()
52
+	{
53
+		return [
54
+			new GraphQLOutputField(
55
+				'eventRelations',
56
+				'String',
57
+				null,
58
+				esc_html__('JSON encoded relational data of the models', 'event_espresso'),
59
+				null,
60
+				[$this, 'getEventRelationalData'],
61
+				[
62
+					'eventId' => [
63
+						'type'        => ['non_null' => 'Int'],
64
+						'description' => esc_html__('The event ID to get the relational data for.', 'event_espresso'),
65
+					],
66
+				]
67
+			),
68
+		];
69
+	}
70
+
71
+
72
+	/**
73
+	 * @param mixed       $source  The source that's passed down the GraphQL queries
74
+	 * @param array       $args    The inputArgs on the field
75
+	 * @param AppContext  $context The AppContext passed down the GraphQL tree
76
+	 * @param ResolveInfo $info    The ResolveInfo passed down the GraphQL tree
77
+	 * @return string
78
+	 * @throws EE_Error
79
+	 * @throws Exception
80
+	 * @throws InvalidArgumentException
81
+	 * @throws InvalidDataTypeException
82
+	 * @throws InvalidInterfaceException
83
+	 * @throws ReflectionException
84
+	 * @throws UserError
85
+	 * @throws UnexpectedEntityException
86
+	 * @since $VID:$
87
+	 */
88
+	public function getEventRelationalData($source, array $args, AppContext $context, ResolveInfo $info)
89
+	{
90
+		/**
91
+		 * Throw an exception if there's no event ID
92
+		 */
93
+		if (empty($args['eventId']) || ! absint($args['eventId'])) {
94
+			throw new UserError(esc_html__(
95
+				'No event ID was provided to get the relational data for',
96
+				'event_espresso'
97
+			));
98
+		}
99
+
100
+		$eventId = absint($args['eventId']);
101
+
102
+		$data = [
103
+			'datetimes'  => [],
104
+			'tickets'    => [],
105
+			'prices'     => [],
106
+		];
107
+
108
+		$eem_datetime   = EEM_Datetime::instance();
109
+		$eem_ticket     = EEM_Ticket::instance();
110
+		$eem_price      = EEM_Price::instance();
111
+		$eem_price_type = EEM_Price_Type::instance();
112
+
113
+		// PROCESS DATETIMES
114
+		$related_models = [
115
+			'tickets' => $eem_ticket,
116
+		];
117
+		// Get the IDs of event datetimes.
118
+		$datetimeIds = $eem_datetime->get_col([['EVT_ID' => $eventId]]);
119
+		foreach ($datetimeIds as $datetimeId) {
120
+			$GID = self::convertToGlobalId($eem_datetime->item_name(), $datetimeId);
121
+			foreach ($related_models as $key => $model) {
122
+				// Get the IDs of related entities for the datetime ID.
123
+				$Ids = $model->get_col([['Datetime.DTT_ID' => $datetimeId]]);
124
+				if (! empty($Ids)) {
125
+					$data['datetimes'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
126
+				}
127
+			}
128
+		}
129
+
130
+		// PROCESS TICKETS
131
+		$related_models = [
132
+			'datetimes' => $eem_datetime,
133
+			'prices'    => $eem_price,
134
+		];
135
+		// Get the IDs of all datetime tickets.
136
+		$ticketIds = $eem_ticket->get_col([['Datetime.DTT_ID' => ['in', $datetimeIds]]]);
137
+		foreach ($ticketIds as $ticketId) {
138
+			$GID = self::convertToGlobalId($eem_ticket->item_name(), $ticketId);
139
+
140
+			foreach ($related_models as $key => $model) {
141
+				// Get the IDs of related entities for the ticket ID.
142
+				$Ids = $model->get_col([['Ticket.TKT_ID' => $ticketId]]);
143
+				if (! empty($Ids)) {
144
+					$data['tickets'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
145
+				}
146
+			}
147
+		}
148
+
149
+		// PROCESS PRICES
150
+		$related_models = [
151
+			'tickets'    => $eem_ticket,
152
+			'priceTypes' => $eem_price_type,
153
+		];
154
+		// Get the IDs of all ticket prices.
155
+		$priceIds = $eem_price->get_col([['Ticket.TKT_ID' => ['in', $ticketIds]]]);
156
+		foreach ($priceIds as $priceId) {
157
+			$GID = self::convertToGlobalId($eem_price->item_name(), $priceId);
158
+
159
+			foreach ($related_models as $key => $model) {
160
+				// Get the IDs of related entities for the price ID.
161
+				$Ids = $model->get_col([['Price.PRC_ID' => $priceId]]);
162
+				if (! empty($Ids)) {
163
+					$data['prices'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
164
+				}
165
+			}
166
+		}
167
+
168
+		return json_encode($data);
169
+	}
170
+
171
+	/**
172
+	 * Convert the DB ID into GID
173
+	 *
174
+	 * @param string    $type
175
+	 * @param int|int[] $ID
176
+	 * @return mixed
177
+	 */
178
+	public static function convertToGlobalId($type, $ID)
179
+	{
180
+		if (is_array($ID)) {
181
+			return array_map(function ($id) use ($type) {
182
+				return self::convertToGlobalId($type, $id);
183
+			}, $ID);
184
+		}
185
+		return Relay::toGlobalId($type, $ID);
186
+	}
187 187
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
             foreach ($related_models as $key => $model) {
122 122
                 // Get the IDs of related entities for the datetime ID.
123 123
                 $Ids = $model->get_col([['Datetime.DTT_ID' => $datetimeId]]);
124
-                if (! empty($Ids)) {
125
-                    $data['datetimes'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
124
+                if ( ! empty($Ids)) {
125
+                    $data['datetimes'][$GID][$key] = self::convertToGlobalId($model->item_name(), $Ids);
126 126
                 }
127 127
             }
128 128
         }
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
             foreach ($related_models as $key => $model) {
141 141
                 // Get the IDs of related entities for the ticket ID.
142 142
                 $Ids = $model->get_col([['Ticket.TKT_ID' => $ticketId]]);
143
-                if (! empty($Ids)) {
144
-                    $data['tickets'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
143
+                if ( ! empty($Ids)) {
144
+                    $data['tickets'][$GID][$key] = self::convertToGlobalId($model->item_name(), $Ids);
145 145
                 }
146 146
             }
147 147
         }
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
             foreach ($related_models as $key => $model) {
160 160
                 // Get the IDs of related entities for the price ID.
161 161
                 $Ids = $model->get_col([['Price.PRC_ID' => $priceId]]);
162
-                if (! empty($Ids)) {
163
-                    $data['prices'][ $GID ][ $key ] = self::convertToGlobalId($model->item_name(), $Ids);
162
+                if ( ! empty($Ids)) {
163
+                    $data['prices'][$GID][$key] = self::convertToGlobalId($model->item_name(), $Ids);
164 164
                 }
165 165
             }
166 166
         }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     public static function convertToGlobalId($type, $ID)
179 179
     {
180 180
         if (is_array($ID)) {
181
-            return array_map(function ($id) use ($type) {
181
+            return array_map(function($id) use ($type) {
182 182
                 return self::convertToGlobalId($type, $id);
183 183
             }, $ID);
184 184
         }
Please login to merge, or discard this patch.
core/services/graphql/fields/GraphQLField.php 1 patch
Indentation   +260 added lines, -260 removed lines patch added patch discarded remove patch
@@ -15,264 +15,264 @@
 block discarded – undo
15 15
 class GraphQLField implements GraphQLFieldInterface
16 16
 {
17 17
 
18
-    /**
19
-     * @var string $name
20
-     */
21
-    protected $name;
22
-
23
-    /**
24
-     * @var string|string[] $type
25
-     */
26
-    protected $type;
27
-
28
-    /**
29
-     * @var string|null $key
30
-     */
31
-    protected $key;
32
-
33
-    /**
34
-     * @var string $description
35
-     */
36
-    protected $description;
37
-
38
-    /**
39
-     * @var callable $formatter
40
-     */
41
-    protected $formatter;
42
-
43
-    /**
44
-     * @var callable $resolve
45
-     */
46
-    protected $resolver;
47
-
48
-    /**
49
-     * @var array $args
50
-     */
51
-    protected $args;
52
-
53
-    /**
54
-     * @var array $caps
55
-     */
56
-    protected $caps;
57
-
58
-    /**
59
-     * @var bool $use_for_input
60
-     */
61
-    protected $use_for_input = true;
62
-
63
-    /**
64
-     * @var bool $use_for_output
65
-     */
66
-    protected $use_for_output = true;
67
-
68
-
69
-    /**
70
-     * @param string          $name
71
-     * @param string|string[] $type
72
-     * @param string|null     $key
73
-     * @param string          $description
74
-     * @param callable|null   $formatter
75
-     * @param callable|null   $resolver
76
-     * @param array           $caps
77
-     */
78
-    public function __construct(
79
-        $name,
80
-        $type,
81
-        $key = null,
82
-        $description = '',
83
-        callable $formatter = null,
84
-        callable $resolver = null,
85
-        array $args = [],
86
-        array $caps = []
87
-    ) {
88
-        $this->name = $name;
89
-        $this->type = $type;
90
-        $this->key = $key;
91
-        $this->description = $description;
92
-        $this->formatter = $formatter;
93
-        $this->resolver = $resolver;
94
-        $this->args = $args;
95
-        $this->caps = $caps;
96
-    }
97
-
98
-
99
-    /**
100
-     * @return array
101
-     */
102
-    public function args()
103
-    {
104
-        return $this->args;
105
-    }
106
-
107
-
108
-    /**
109
-     * @return array
110
-     */
111
-    public function caps()
112
-    {
113
-        return $this->caps;
114
-    }
115
-
116
-
117
-    /**
118
-     * @return string
119
-     */
120
-    public function description()
121
-    {
122
-        return $this->description;
123
-    }
124
-
125
-
126
-    /**
127
-     * @return string
128
-     */
129
-    public function key()
130
-    {
131
-        return $this->key;
132
-    }
133
-
134
-
135
-    /**
136
-     * @return string
137
-     */
138
-    public function name()
139
-    {
140
-        return $this->name;
141
-    }
142
-
143
-
144
-    /**
145
-     * @return string|string[]
146
-     */
147
-    public function type()
148
-    {
149
-        return $this->type;
150
-    }
151
-
152
-
153
-    /**
154
-     * Convert the field to array to be
155
-     * able to pass as config to WP GraphQL
156
-     *
157
-     * @return array
158
-     */
159
-    public function toArray()
160
-    {
161
-        return get_object_vars($this);
162
-    }
163
-
164
-
165
-    /**
166
-     * Sets the value for use_for_input.
167
-     *
168
-     * @param bool $use_for_input
169
-     */
170
-    protected function setUseForInput($use_for_input)
171
-    {
172
-        $this->use_for_input = filter_var($use_for_input, FILTER_VALIDATE_BOOLEAN);
173
-    }
174
-
175
-
176
-    /**
177
-     * Whether the field should be used for
178
-     * mutation inputs.
179
-     *
180
-     * @return bool
181
-     */
182
-    public function useForInput()
183
-    {
184
-        return (bool) $this->use_for_input;
185
-    }
186
-
187
-
188
-    /**
189
-     * Whether the field should be used for
190
-     * query outputs.
191
-     *
192
-     * @return bool
193
-     */
194
-    public function useForOutput()
195
-    {
196
-        return (bool) $this->use_for_output;
197
-    }
198
-
199
-
200
-    /**
201
-     * Sets the value for use_for_output
202
-     *
203
-     * @param bool $use_for_output
204
-     */
205
-    protected function setUseForOutput($use_for_output)
206
-    {
207
-        $this->use_for_output = filter_var($use_for_output, FILTER_VALIDATE_BOOLEAN);
208
-    }
209
-
210
-
211
-    /**
212
-     * Whether the field should resolve
213
-     * based on the user caps etc.
214
-     *
215
-     * @return boolean
216
-     */
217
-    public function shouldResolve()
218
-    {
219
-        foreach ($this->caps as $cap) {
220
-            if (! current_user_can($cap)) {
221
-                return false;
222
-            }
223
-        }
224
-        return true;
225
-    }
226
-
227
-
228
-    /**
229
-     * Whether the field has an explicit resolver set.
230
-     *
231
-     * @return boolean
232
-     */
233
-    public function hasInternalResolver()
234
-    {
235
-        return is_callable($this->resolver);
236
-    }
237
-
238
-
239
-    /**
240
-     * Whether the field has an explicit resolver set.
241
-     *
242
-     * @param mixed       $source  The source that's passed down the GraphQL queries
243
-     * @param array       $args    The inputArgs on the field
244
-     * @param AppContext  $context The AppContext passed down the GraphQL tree
245
-     * @param ResolveInfo $info    The ResolveInfo passed down the GraphQL tree
246
-     * @return mixed
247
-     * @throws LogicException
248
-     */
249
-    public function resolve($source, array $args, AppContext $context, ResolveInfo $info)
250
-    {
251
-        if (! $this->hasInternalResolver()) {
252
-            throw new LogicException('GraphQLField has no internal resolver.');
253
-        }
254
-        // dynamic methods using $this don't play nice
255
-        // so capture resolver to a single var first
256
-        $resolver = $this->resolver;
257
-        return $resolver($source, $args, $context, $info);
258
-    }
259
-
260
-
261
-    /**
262
-     * Checks if the format callback is set.
263
-     * If yes, then uses it to format the value.
264
-     *
265
-     * @param mixed $value
266
-     * @return mixed The formatted value.
267
-     */
268
-    public function mayBeFormatValue($value)
269
-    {
270
-        if (is_callable($this->formatter)) {
271
-            // dynamic methods using $this don't play nice
272
-            // so capture formatter to a single var first
273
-            $formatter = $this->formatter;
274
-            return $formatter($value);
275
-        }
276
-        return $value;
277
-    }
18
+	/**
19
+	 * @var string $name
20
+	 */
21
+	protected $name;
22
+
23
+	/**
24
+	 * @var string|string[] $type
25
+	 */
26
+	protected $type;
27
+
28
+	/**
29
+	 * @var string|null $key
30
+	 */
31
+	protected $key;
32
+
33
+	/**
34
+	 * @var string $description
35
+	 */
36
+	protected $description;
37
+
38
+	/**
39
+	 * @var callable $formatter
40
+	 */
41
+	protected $formatter;
42
+
43
+	/**
44
+	 * @var callable $resolve
45
+	 */
46
+	protected $resolver;
47
+
48
+	/**
49
+	 * @var array $args
50
+	 */
51
+	protected $args;
52
+
53
+	/**
54
+	 * @var array $caps
55
+	 */
56
+	protected $caps;
57
+
58
+	/**
59
+	 * @var bool $use_for_input
60
+	 */
61
+	protected $use_for_input = true;
62
+
63
+	/**
64
+	 * @var bool $use_for_output
65
+	 */
66
+	protected $use_for_output = true;
67
+
68
+
69
+	/**
70
+	 * @param string          $name
71
+	 * @param string|string[] $type
72
+	 * @param string|null     $key
73
+	 * @param string          $description
74
+	 * @param callable|null   $formatter
75
+	 * @param callable|null   $resolver
76
+	 * @param array           $caps
77
+	 */
78
+	public function __construct(
79
+		$name,
80
+		$type,
81
+		$key = null,
82
+		$description = '',
83
+		callable $formatter = null,
84
+		callable $resolver = null,
85
+		array $args = [],
86
+		array $caps = []
87
+	) {
88
+		$this->name = $name;
89
+		$this->type = $type;
90
+		$this->key = $key;
91
+		$this->description = $description;
92
+		$this->formatter = $formatter;
93
+		$this->resolver = $resolver;
94
+		$this->args = $args;
95
+		$this->caps = $caps;
96
+	}
97
+
98
+
99
+	/**
100
+	 * @return array
101
+	 */
102
+	public function args()
103
+	{
104
+		return $this->args;
105
+	}
106
+
107
+
108
+	/**
109
+	 * @return array
110
+	 */
111
+	public function caps()
112
+	{
113
+		return $this->caps;
114
+	}
115
+
116
+
117
+	/**
118
+	 * @return string
119
+	 */
120
+	public function description()
121
+	{
122
+		return $this->description;
123
+	}
124
+
125
+
126
+	/**
127
+	 * @return string
128
+	 */
129
+	public function key()
130
+	{
131
+		return $this->key;
132
+	}
133
+
134
+
135
+	/**
136
+	 * @return string
137
+	 */
138
+	public function name()
139
+	{
140
+		return $this->name;
141
+	}
142
+
143
+
144
+	/**
145
+	 * @return string|string[]
146
+	 */
147
+	public function type()
148
+	{
149
+		return $this->type;
150
+	}
151
+
152
+
153
+	/**
154
+	 * Convert the field to array to be
155
+	 * able to pass as config to WP GraphQL
156
+	 *
157
+	 * @return array
158
+	 */
159
+	public function toArray()
160
+	{
161
+		return get_object_vars($this);
162
+	}
163
+
164
+
165
+	/**
166
+	 * Sets the value for use_for_input.
167
+	 *
168
+	 * @param bool $use_for_input
169
+	 */
170
+	protected function setUseForInput($use_for_input)
171
+	{
172
+		$this->use_for_input = filter_var($use_for_input, FILTER_VALIDATE_BOOLEAN);
173
+	}
174
+
175
+
176
+	/**
177
+	 * Whether the field should be used for
178
+	 * mutation inputs.
179
+	 *
180
+	 * @return bool
181
+	 */
182
+	public function useForInput()
183
+	{
184
+		return (bool) $this->use_for_input;
185
+	}
186
+
187
+
188
+	/**
189
+	 * Whether the field should be used for
190
+	 * query outputs.
191
+	 *
192
+	 * @return bool
193
+	 */
194
+	public function useForOutput()
195
+	{
196
+		return (bool) $this->use_for_output;
197
+	}
198
+
199
+
200
+	/**
201
+	 * Sets the value for use_for_output
202
+	 *
203
+	 * @param bool $use_for_output
204
+	 */
205
+	protected function setUseForOutput($use_for_output)
206
+	{
207
+		$this->use_for_output = filter_var($use_for_output, FILTER_VALIDATE_BOOLEAN);
208
+	}
209
+
210
+
211
+	/**
212
+	 * Whether the field should resolve
213
+	 * based on the user caps etc.
214
+	 *
215
+	 * @return boolean
216
+	 */
217
+	public function shouldResolve()
218
+	{
219
+		foreach ($this->caps as $cap) {
220
+			if (! current_user_can($cap)) {
221
+				return false;
222
+			}
223
+		}
224
+		return true;
225
+	}
226
+
227
+
228
+	/**
229
+	 * Whether the field has an explicit resolver set.
230
+	 *
231
+	 * @return boolean
232
+	 */
233
+	public function hasInternalResolver()
234
+	{
235
+		return is_callable($this->resolver);
236
+	}
237
+
238
+
239
+	/**
240
+	 * Whether the field has an explicit resolver set.
241
+	 *
242
+	 * @param mixed       $source  The source that's passed down the GraphQL queries
243
+	 * @param array       $args    The inputArgs on the field
244
+	 * @param AppContext  $context The AppContext passed down the GraphQL tree
245
+	 * @param ResolveInfo $info    The ResolveInfo passed down the GraphQL tree
246
+	 * @return mixed
247
+	 * @throws LogicException
248
+	 */
249
+	public function resolve($source, array $args, AppContext $context, ResolveInfo $info)
250
+	{
251
+		if (! $this->hasInternalResolver()) {
252
+			throw new LogicException('GraphQLField has no internal resolver.');
253
+		}
254
+		// dynamic methods using $this don't play nice
255
+		// so capture resolver to a single var first
256
+		$resolver = $this->resolver;
257
+		return $resolver($source, $args, $context, $info);
258
+	}
259
+
260
+
261
+	/**
262
+	 * Checks if the format callback is set.
263
+	 * If yes, then uses it to format the value.
264
+	 *
265
+	 * @param mixed $value
266
+	 * @return mixed The formatted value.
267
+	 */
268
+	public function mayBeFormatValue($value)
269
+	{
270
+		if (is_callable($this->formatter)) {
271
+			// dynamic methods using $this don't play nice
272
+			// so capture formatter to a single var first
273
+			$formatter = $this->formatter;
274
+			return $formatter($value);
275
+		}
276
+		return $value;
277
+	}
278 278
 }
Please login to merge, or discard this patch.
core/services/graphql/types/TypeBase.php 1 patch
Indentation   +231 added lines, -231 removed lines patch added patch discarded remove patch
@@ -30,235 +30,235 @@
 block discarded – undo
30 30
 abstract class TypeBase implements TypeInterface
31 31
 {
32 32
 
33
-    /**
34
-     * @var EEM_Base $model
35
-     */
36
-    protected $model;
37
-
38
-    /**
39
-     * @var string $name
40
-     */
41
-    protected $name = '';
42
-
43
-    /**
44
-     * @var string $description
45
-     */
46
-    protected $description = '';
47
-
48
-    /**
49
-     * @var GraphQLFieldInterface[] $fields
50
-     */
51
-    protected $fields = [];
52
-
53
-    /**
54
-     * @var array $graphql_to_model_map
55
-     */
56
-    protected $graphql_to_model_map = [];
57
-
58
-    /**
59
-     * @var FieldResolver $field_resolver
60
-     */
61
-    protected $field_resolver;
62
-
63
-    /**
64
-     * @var bool $is_custom_post_type
65
-     */
66
-    protected $is_custom_post_type = false;
67
-
68
-
69
-    /**
70
-     * TypeBase constructor.
71
-     */
72
-    public function __construct()
73
-    {
74
-        $this->setFields($this->getFields());
75
-        $this->field_resolver = new FieldResolver(
76
-            $this->model,
77
-            $this->getFieldsForResolver()
78
-        );
79
-    }
80
-
81
-
82
-    /**
83
-     * @return GraphQLFieldInterface[]
84
-     * @since $VID:$
85
-     */
86
-    abstract protected function getFields();
87
-
88
-
89
-    /**
90
-     * @return string
91
-     */
92
-    public function name()
93
-    {
94
-        return $this->name;
95
-    }
96
-
97
-
98
-    /**
99
-     * @param string $name
100
-     */
101
-    protected function setName($name)
102
-    {
103
-        $this->name = $name;
104
-    }
105
-
106
-
107
-    /**
108
-     * @return string
109
-     */
110
-    public function description()
111
-    {
112
-        return $this->description;
113
-    }
114
-
115
-
116
-    /**
117
-     * @param string $description
118
-     */
119
-    protected function setDescription($description)
120
-    {
121
-        $this->description = $description;
122
-    }
123
-
124
-
125
-    /**
126
-     * @return GraphQLFieldInterface[]
127
-     * @since $VID:$
128
-     */
129
-    public function fields()
130
-    {
131
-        return (array) $this->fields;
132
-    }
133
-
134
-
135
-    /**
136
-     * @param GraphQLFieldInterface[] $fields
137
-     */
138
-    protected function setFields(array $fields)
139
-    {
140
-        foreach ($fields as $field) {
141
-            if ($field instanceof GraphQLField) {
142
-                $this->fields[] = $field;
143
-            }
144
-        }
145
-    }
146
-
147
-
148
-    /**
149
-     * Creates a key map for internal resolver.
150
-     *
151
-     * @return array
152
-     * @since $VID:$
153
-     */
154
-    public function getFieldsForResolver()
155
-    {
156
-        $fields = [];
157
-        foreach ($this->fields() as $field) {
158
-            if ($field->useForOutput()) {
159
-                $fields[ $field->name() ] = $field;
160
-            }
161
-        }
162
-        return $fields;
163
-    }
164
-
165
-
166
-    /**
167
-     * @return bool
168
-     */
169
-    public function isCustomPostType()
170
-    {
171
-        return $this->is_custom_post_type;
172
-    }
173
-
174
-
175
-    /**
176
-     * @param bool $is_custom_post_type
177
-     */
178
-    protected function setIsCustomPostType($is_custom_post_type)
179
-    {
180
-        $this->is_custom_post_type = filter_var($is_custom_post_type, FILTER_VALIDATE_BOOLEAN);
181
-    }
182
-
183
-
184
-    /**
185
-     * @param int $value
186
-     * @return int
187
-     * @since $VID:$
188
-     */
189
-    public function parseInfiniteValue($value)
190
-    {
191
-        $value = trim($value);
192
-        return $value === null
193
-               || $value === ''
194
-               || $value === '∞'
195
-               || $value === 'INF'
196
-               || $value === INF
197
-               || $value === EE_INF
198
-               || is_infinite((float) $value)
199
-            ? -1
200
-            : $value;
201
-    }
202
-
203
-
204
-    /**
205
-     * @param mixed $source
206
-     * @return EE_Base_Class|null
207
-     * @since $VID:$
208
-     */
209
-    private function getModel($source)
210
-    {
211
-        // If it comes from a custom connection
212
-        // where the $source is already instantiated.
213
-        if ($source instanceof EE_Base_Class) {
214
-            return $source;
215
-        }
216
-        return $source instanceof Post ? $this->model->get_one_by_ID($source->ID) : null;
217
-    }
218
-
219
-
220
-    /**
221
-     * @param mixed       $source  The source that's passed down the GraphQL queries
222
-     * @param array       $args    The inputArgs on the field
223
-     * @param AppContext  $context The AppContext passed down the GraphQL tree
224
-     * @param ResolveInfo $info    The ResolveInfo passed down the GraphQL tree
225
-     * @return string
226
-     * @throws EE_Error
227
-     * @throws InvalidDataTypeException
228
-     * @throws InvalidInterfaceException
229
-     * @throws UnexpectedEntityException
230
-     * @throws UserError
231
-     * @throws InvalidArgumentException
232
-     * @throws ReflectionException
233
-     * @since $VID:$
234
-     */
235
-    public function resolveField($source, $args, AppContext $context, ResolveInfo $info)
236
-    {
237
-        $source = $source instanceof RootQuery ? $source : $this->getModel($source);
238
-
239
-        return $this->field_resolver->resolve($source, $args, $context, $info);
240
-    }
241
-
242
-
243
-    /**
244
-     * @param mixed      $payload The payload returned after mutation
245
-     * @param array      $args    The inputArgs on the field
246
-     * @param AppContext $context The AppContext passed down the GraphQL tree
247
-     * @return string
248
-     * @throws EE_Error
249
-     * @throws InvalidDataTypeException
250
-     * @throws InvalidInterfaceException
251
-     * @throws UnexpectedEntityException
252
-     * @throws UserError
253
-     * @throws InvalidArgumentException
254
-     * @throws ReflectionException
255
-     * @since $VID:$
256
-     */
257
-    public function resolveFromPayload($payload, $args, AppContext $context)
258
-    {
259
-        if (empty($payload['id']) || ! absint($payload['id'])) {
260
-            return null;
261
-        }
262
-        return $this->model->get_one_by_ID($payload['id']);
263
-    }
33
+	/**
34
+	 * @var EEM_Base $model
35
+	 */
36
+	protected $model;
37
+
38
+	/**
39
+	 * @var string $name
40
+	 */
41
+	protected $name = '';
42
+
43
+	/**
44
+	 * @var string $description
45
+	 */
46
+	protected $description = '';
47
+
48
+	/**
49
+	 * @var GraphQLFieldInterface[] $fields
50
+	 */
51
+	protected $fields = [];
52
+
53
+	/**
54
+	 * @var array $graphql_to_model_map
55
+	 */
56
+	protected $graphql_to_model_map = [];
57
+
58
+	/**
59
+	 * @var FieldResolver $field_resolver
60
+	 */
61
+	protected $field_resolver;
62
+
63
+	/**
64
+	 * @var bool $is_custom_post_type
65
+	 */
66
+	protected $is_custom_post_type = false;
67
+
68
+
69
+	/**
70
+	 * TypeBase constructor.
71
+	 */
72
+	public function __construct()
73
+	{
74
+		$this->setFields($this->getFields());
75
+		$this->field_resolver = new FieldResolver(
76
+			$this->model,
77
+			$this->getFieldsForResolver()
78
+		);
79
+	}
80
+
81
+
82
+	/**
83
+	 * @return GraphQLFieldInterface[]
84
+	 * @since $VID:$
85
+	 */
86
+	abstract protected function getFields();
87
+
88
+
89
+	/**
90
+	 * @return string
91
+	 */
92
+	public function name()
93
+	{
94
+		return $this->name;
95
+	}
96
+
97
+
98
+	/**
99
+	 * @param string $name
100
+	 */
101
+	protected function setName($name)
102
+	{
103
+		$this->name = $name;
104
+	}
105
+
106
+
107
+	/**
108
+	 * @return string
109
+	 */
110
+	public function description()
111
+	{
112
+		return $this->description;
113
+	}
114
+
115
+
116
+	/**
117
+	 * @param string $description
118
+	 */
119
+	protected function setDescription($description)
120
+	{
121
+		$this->description = $description;
122
+	}
123
+
124
+
125
+	/**
126
+	 * @return GraphQLFieldInterface[]
127
+	 * @since $VID:$
128
+	 */
129
+	public function fields()
130
+	{
131
+		return (array) $this->fields;
132
+	}
133
+
134
+
135
+	/**
136
+	 * @param GraphQLFieldInterface[] $fields
137
+	 */
138
+	protected function setFields(array $fields)
139
+	{
140
+		foreach ($fields as $field) {
141
+			if ($field instanceof GraphQLField) {
142
+				$this->fields[] = $field;
143
+			}
144
+		}
145
+	}
146
+
147
+
148
+	/**
149
+	 * Creates a key map for internal resolver.
150
+	 *
151
+	 * @return array
152
+	 * @since $VID:$
153
+	 */
154
+	public function getFieldsForResolver()
155
+	{
156
+		$fields = [];
157
+		foreach ($this->fields() as $field) {
158
+			if ($field->useForOutput()) {
159
+				$fields[ $field->name() ] = $field;
160
+			}
161
+		}
162
+		return $fields;
163
+	}
164
+
165
+
166
+	/**
167
+	 * @return bool
168
+	 */
169
+	public function isCustomPostType()
170
+	{
171
+		return $this->is_custom_post_type;
172
+	}
173
+
174
+
175
+	/**
176
+	 * @param bool $is_custom_post_type
177
+	 */
178
+	protected function setIsCustomPostType($is_custom_post_type)
179
+	{
180
+		$this->is_custom_post_type = filter_var($is_custom_post_type, FILTER_VALIDATE_BOOLEAN);
181
+	}
182
+
183
+
184
+	/**
185
+	 * @param int $value
186
+	 * @return int
187
+	 * @since $VID:$
188
+	 */
189
+	public function parseInfiniteValue($value)
190
+	{
191
+		$value = trim($value);
192
+		return $value === null
193
+			   || $value === ''
194
+			   || $value === '∞'
195
+			   || $value === 'INF'
196
+			   || $value === INF
197
+			   || $value === EE_INF
198
+			   || is_infinite((float) $value)
199
+			? -1
200
+			: $value;
201
+	}
202
+
203
+
204
+	/**
205
+	 * @param mixed $source
206
+	 * @return EE_Base_Class|null
207
+	 * @since $VID:$
208
+	 */
209
+	private function getModel($source)
210
+	{
211
+		// If it comes from a custom connection
212
+		// where the $source is already instantiated.
213
+		if ($source instanceof EE_Base_Class) {
214
+			return $source;
215
+		}
216
+		return $source instanceof Post ? $this->model->get_one_by_ID($source->ID) : null;
217
+	}
218
+
219
+
220
+	/**
221
+	 * @param mixed       $source  The source that's passed down the GraphQL queries
222
+	 * @param array       $args    The inputArgs on the field
223
+	 * @param AppContext  $context The AppContext passed down the GraphQL tree
224
+	 * @param ResolveInfo $info    The ResolveInfo passed down the GraphQL tree
225
+	 * @return string
226
+	 * @throws EE_Error
227
+	 * @throws InvalidDataTypeException
228
+	 * @throws InvalidInterfaceException
229
+	 * @throws UnexpectedEntityException
230
+	 * @throws UserError
231
+	 * @throws InvalidArgumentException
232
+	 * @throws ReflectionException
233
+	 * @since $VID:$
234
+	 */
235
+	public function resolveField($source, $args, AppContext $context, ResolveInfo $info)
236
+	{
237
+		$source = $source instanceof RootQuery ? $source : $this->getModel($source);
238
+
239
+		return $this->field_resolver->resolve($source, $args, $context, $info);
240
+	}
241
+
242
+
243
+	/**
244
+	 * @param mixed      $payload The payload returned after mutation
245
+	 * @param array      $args    The inputArgs on the field
246
+	 * @param AppContext $context The AppContext passed down the GraphQL tree
247
+	 * @return string
248
+	 * @throws EE_Error
249
+	 * @throws InvalidDataTypeException
250
+	 * @throws InvalidInterfaceException
251
+	 * @throws UnexpectedEntityException
252
+	 * @throws UserError
253
+	 * @throws InvalidArgumentException
254
+	 * @throws ReflectionException
255
+	 * @since $VID:$
256
+	 */
257
+	public function resolveFromPayload($payload, $args, AppContext $context)
258
+	{
259
+		if (empty($payload['id']) || ! absint($payload['id'])) {
260
+			return null;
261
+		}
262
+		return $this->model->get_one_by_ID($payload['id']);
263
+	}
264 264
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/types/PriceType.php 2 patches
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -22,88 +22,88 @@
 block discarded – undo
22 22
 class PriceType extends TypeBase
23 23
 {
24 24
 
25
-    /**
26
-     * PriceType constructor.
27
-     *
28
-     * @param EEM_Price_Type $price_type_model
29
-     */
30
-    public function __construct(EEM_Price_Type $price_type_model)
31
-    {
32
-        $this->model = $price_type_model;
33
-        $this->setName('PriceType');
34
-        $this->setDescription(__('A price type.', 'event_espresso'));
35
-        $this->setIsCustomPostType(false);
36
-        parent::__construct();
37
-    }
25
+	/**
26
+	 * PriceType constructor.
27
+	 *
28
+	 * @param EEM_Price_Type $price_type_model
29
+	 */
30
+	public function __construct(EEM_Price_Type $price_type_model)
31
+	{
32
+		$this->model = $price_type_model;
33
+		$this->setName('PriceType');
34
+		$this->setDescription(__('A price type.', 'event_espresso'));
35
+		$this->setIsCustomPostType(false);
36
+		parent::__construct();
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * @return GraphQLFieldInterface[]
42
-     * @since $VID:$
43
-     */
44
-    public function getFields()
45
-    {
46
-        return [
47
-            new GraphQLField(
48
-                'id',
49
-                ['non_null' => 'ID'],
50
-                null,
51
-                esc_html__('The globally unique ID for the object.', 'event_espresso')
52
-            ),
53
-            new GraphQLOutputField(
54
-                lcfirst($this->name()) . 'Id',
55
-                ['non_null' => 'Int'],
56
-                'ID',
57
-                esc_html__('Price type ID', 'event_espresso')
58
-            ),
59
-            new GraphQLField(
60
-                'name',
61
-                'String',
62
-                'name',
63
-                esc_html__('Price type Name', 'event_espresso')
64
-            ),
65
-            new GraphQLField(
66
-                'baseType',
67
-                'Int',
68
-                'base_type',
69
-                esc_html__('Price Base type ID, 1 = Price , 2 = Discount , 3 = Surcharge , 4 = Tax', 'event_espresso')
70
-            ),
71
-            new GraphQLField(
72
-                'order',
73
-                'Int',
74
-                'order',
75
-                esc_html__('Order in which price should be applied.', 'event_espresso')
76
-            ),
77
-            new GraphQLField(
78
-                'isPercent',
79
-                'Boolean',
80
-                'is_percent',
81
-                esc_html__('Flag indicating price type is a percentage.', 'event_espresso')
82
-            ),
83
-            new GraphQLOutputField(
84
-                'isDiscount',
85
-                'Boolean',
86
-                'is_discount',
87
-                esc_html__('Flag indicating price type is a discount.', 'event_espresso')
88
-            ),
89
-            new GraphQLField(
90
-                'isDeleted',
91
-                'Boolean',
92
-                'deleted',
93
-                esc_html__('Flag indicating price type has been trashed.', 'event_espresso')
94
-            ),
95
-            new GraphQLOutputField(
96
-                'wpUser',
97
-                'User',
98
-                null,
99
-                esc_html__('Price Type Creator', 'event_espresso')
100
-            ),
101
-            new GraphQLInputField(
102
-                'wpUser',
103
-                'Int',
104
-                null,
105
-                esc_html__('Price Type Creator ID', 'event_espresso')
106
-            ),
107
-        ];
108
-    }
40
+	/**
41
+	 * @return GraphQLFieldInterface[]
42
+	 * @since $VID:$
43
+	 */
44
+	public function getFields()
45
+	{
46
+		return [
47
+			new GraphQLField(
48
+				'id',
49
+				['non_null' => 'ID'],
50
+				null,
51
+				esc_html__('The globally unique ID for the object.', 'event_espresso')
52
+			),
53
+			new GraphQLOutputField(
54
+				lcfirst($this->name()) . 'Id',
55
+				['non_null' => 'Int'],
56
+				'ID',
57
+				esc_html__('Price type ID', 'event_espresso')
58
+			),
59
+			new GraphQLField(
60
+				'name',
61
+				'String',
62
+				'name',
63
+				esc_html__('Price type Name', 'event_espresso')
64
+			),
65
+			new GraphQLField(
66
+				'baseType',
67
+				'Int',
68
+				'base_type',
69
+				esc_html__('Price Base type ID, 1 = Price , 2 = Discount , 3 = Surcharge , 4 = Tax', 'event_espresso')
70
+			),
71
+			new GraphQLField(
72
+				'order',
73
+				'Int',
74
+				'order',
75
+				esc_html__('Order in which price should be applied.', 'event_espresso')
76
+			),
77
+			new GraphQLField(
78
+				'isPercent',
79
+				'Boolean',
80
+				'is_percent',
81
+				esc_html__('Flag indicating price type is a percentage.', 'event_espresso')
82
+			),
83
+			new GraphQLOutputField(
84
+				'isDiscount',
85
+				'Boolean',
86
+				'is_discount',
87
+				esc_html__('Flag indicating price type is a discount.', 'event_espresso')
88
+			),
89
+			new GraphQLField(
90
+				'isDeleted',
91
+				'Boolean',
92
+				'deleted',
93
+				esc_html__('Flag indicating price type has been trashed.', 'event_espresso')
94
+			),
95
+			new GraphQLOutputField(
96
+				'wpUser',
97
+				'User',
98
+				null,
99
+				esc_html__('Price Type Creator', 'event_espresso')
100
+			),
101
+			new GraphQLInputField(
102
+				'wpUser',
103
+				'Int',
104
+				null,
105
+				esc_html__('Price Type Creator ID', 'event_espresso')
106
+			),
107
+		];
108
+	}
109 109
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 esc_html__('The globally unique ID for the object.', 'event_espresso')
52 52
             ),
53 53
             new GraphQLOutputField(
54
-                lcfirst($this->name()) . 'Id',
54
+                lcfirst($this->name()).'Id',
55 55
                 ['non_null' => 'Int'],
56 56
                 'ID',
57 57
                 esc_html__('Price type ID', 'event_espresso')
Please login to merge, or discard this patch.
core/domain/services/graphql/types/Datetime.php 1 patch
Indentation   +249 added lines, -249 removed lines patch added patch discarded remove patch
@@ -25,259 +25,259 @@
 block discarded – undo
25 25
 class Datetime extends TypeBase
26 26
 {
27 27
 
28
-    /**
29
-     * EventDate constructor.
30
-     *
31
-     * @param EEM_Datetime $datetime_model
32
-     */
33
-    public function __construct(EEM_Datetime $datetime_model)
34
-    {
35
-        $this->model = $datetime_model;
36
-        $this->setName('Datetime');
37
-        $this->setDescription(__('An event date', 'event_espresso'));
38
-        $this->setIsCustomPostType(false);
39
-        parent::__construct();
40
-    }
28
+	/**
29
+	 * EventDate constructor.
30
+	 *
31
+	 * @param EEM_Datetime $datetime_model
32
+	 */
33
+	public function __construct(EEM_Datetime $datetime_model)
34
+	{
35
+		$this->model = $datetime_model;
36
+		$this->setName('Datetime');
37
+		$this->setDescription(__('An event date', 'event_espresso'));
38
+		$this->setIsCustomPostType(false);
39
+		parent::__construct();
40
+	}
41 41
 
42 42
 
43
-    /**
44
-     * @return GraphQLFieldInterface[]
45
-     * @since $VID:$
46
-     */
47
-    public function getFields()
48
-    {
49
-        return [
50
-            new GraphQLField(
51
-                'id',
52
-                ['non_null' => 'ID'],
53
-                null,
54
-                esc_html__('The globally unique ID for the object.', 'event_espresso')
55
-            ),
56
-            new GraphQLOutputField(
57
-                lcfirst($this->name()) . 'Id',
58
-                ['non_null' => 'Int'],
59
-                'ID',
60
-                esc_html__('The datetime ID.', 'event_espresso')
61
-            ),
62
-            new GraphQLField(
63
-                'name',
64
-                'String',
65
-                'name',
66
-                esc_html__('Datetime Name', 'event_espresso')
67
-            ),
68
-            new GraphQLField(
69
-                'description',
70
-                'String',
71
-                'description',
72
-                esc_html__('Description for Datetime', 'event_espresso')
73
-            ),
74
-            new GraphQLField(
75
-                'start',
76
-                'String',
77
-                'start',
78
-                esc_html__('Start timestamp of Event', 'event_espresso')
79
-            ),
80
-            new GraphQLField(
81
-                'startDate',
82
-                'String',
83
-                'start_date',
84
-                esc_html__('Start time/date of Event', 'event_espresso')
85
-            ),
86
-            new GraphQLField(
87
-                'end',
88
-                'String',
89
-                'end',
90
-                esc_html__('End timestamp of Event', 'event_espresso')
91
-            ),
92
-            new GraphQLField(
93
-                'endDate',
94
-                'String',
95
-                'end_date',
96
-                esc_html__('End time/date of Event', 'event_espresso')
97
-            ),
98
-            new GraphQLField(
99
-                'startTime',
100
-                'String',
101
-                'start_time',
102
-                esc_html__('Start time of Event', 'event_espresso')
103
-            ),
104
-            new GraphQLField(
105
-                'endTime',
106
-                'String',
107
-                'end_time',
108
-                esc_html__('End time of Event', 'event_espresso')
109
-            ),
110
-            new GraphQLField(
111
-                'capacity',
112
-                'Int',
113
-                'reg_limit',
114
-                esc_html__('Registration Limit for this time', 'event_espresso'),
115
-                [$this, 'parseInfiniteValue']
116
-            ),
117
-            new GraphQLField(
118
-                'sold',
119
-                'Int',
120
-                'sold',
121
-                esc_html__('How many sales for this Datetime that have occurred', 'event_espresso')
122
-            ),
123
-            new GraphQLField(
124
-                'reserved',
125
-                'Int',
126
-                'reserved',
127
-                esc_html__('Quantity of tickets reserved, but not yet fully purchased', 'event_espresso')
128
-            ),
129
-            new GraphQLField(
130
-                'order',
131
-                'Int',
132
-                'order',
133
-                esc_html__('The order in which the Datetime is displayed', 'event_espresso')
134
-            ),
135
-            new GraphQLField(
136
-                'length',
137
-                'Int',
138
-                'length',
139
-                esc_html__('The length of the event (start to end time) in seconds', 'event_espresso')
140
-            ),
141
-            new GraphQLOutputField(
142
-                'parent',
143
-                $this->name(),
144
-                null,
145
-                esc_html__('The parent datetime of the current datetime', 'event_espresso')
146
-            ),
147
-            new GraphQLInputField(
148
-                'parent',
149
-                'ID',
150
-                null,
151
-                esc_html__('The parent datetime ID', 'event_espresso')
152
-            ),
153
-            new GraphQLField(
154
-                'isPrimary',
155
-                'Boolean',
156
-                'is_primary',
157
-                esc_html__('Flag indicating datetime is primary one for event', 'event_espresso')
158
-            ),
159
-            new GraphQLField(
160
-                'isSoldOut',
161
-                'Boolean',
162
-                'sold_out',
163
-                esc_html__(
164
-                    'Flag indicating whether the tickets sold for this datetime, met or exceed the registration limit',
165
-                    'event_espresso'
166
-                )
167
-            ),
168
-            new GraphQLField(
169
-                'isUpcoming',
170
-                'Boolean',
171
-                'is_upcoming',
172
-                esc_html__('Whether the date is upcoming', 'event_espresso')
173
-            ),
174
-            new GraphQLField(
175
-                'isActive',
176
-                'Boolean',
177
-                'is_active',
178
-                esc_html__('Flag indicating datetime is active', 'event_espresso')
179
-            ),
180
-            new GraphQLField(
181
-                'isExpired',
182
-                'Boolean',
183
-                'is_expired',
184
-                esc_html__('Flag indicating datetime is expired or not', 'event_espresso')
185
-            ),
186
-            new GraphQLOutputField(
187
-                'event',
188
-                'Event',
189
-                null,
190
-                esc_html__('Event of the datetime.', 'event_espresso')
191
-            ),
192
-            new GraphQLInputField(
193
-                'eventId',
194
-                'Int',
195
-                null,
196
-                esc_html__('Event ID of the datetime.', 'event_espresso')
197
-            ),
198
-            new GraphQLInputField(
199
-                'event',
200
-                'ID',
201
-                null,
202
-                esc_html__('Globally uqinue event ID of the datetime.', 'event_espresso')
203
-            ),
204
-            new GraphQLInputField(
205
-                'tickets',
206
-                ['list_of' => 'ID'],
207
-                null,
208
-                sprintf(
209
-                    '%1$s %2$s',
210
-                    esc_html__('Globally uqinue IDs of the tickets related to the datetime.', 'event_espresso'),
211
-                    esc_html__('Ignored if empty.', 'event_espresso')
212
-                )
213
-            ),
214
-        ];
215
-    }
43
+	/**
44
+	 * @return GraphQLFieldInterface[]
45
+	 * @since $VID:$
46
+	 */
47
+	public function getFields()
48
+	{
49
+		return [
50
+			new GraphQLField(
51
+				'id',
52
+				['non_null' => 'ID'],
53
+				null,
54
+				esc_html__('The globally unique ID for the object.', 'event_espresso')
55
+			),
56
+			new GraphQLOutputField(
57
+				lcfirst($this->name()) . 'Id',
58
+				['non_null' => 'Int'],
59
+				'ID',
60
+				esc_html__('The datetime ID.', 'event_espresso')
61
+			),
62
+			new GraphQLField(
63
+				'name',
64
+				'String',
65
+				'name',
66
+				esc_html__('Datetime Name', 'event_espresso')
67
+			),
68
+			new GraphQLField(
69
+				'description',
70
+				'String',
71
+				'description',
72
+				esc_html__('Description for Datetime', 'event_espresso')
73
+			),
74
+			new GraphQLField(
75
+				'start',
76
+				'String',
77
+				'start',
78
+				esc_html__('Start timestamp of Event', 'event_espresso')
79
+			),
80
+			new GraphQLField(
81
+				'startDate',
82
+				'String',
83
+				'start_date',
84
+				esc_html__('Start time/date of Event', 'event_espresso')
85
+			),
86
+			new GraphQLField(
87
+				'end',
88
+				'String',
89
+				'end',
90
+				esc_html__('End timestamp of Event', 'event_espresso')
91
+			),
92
+			new GraphQLField(
93
+				'endDate',
94
+				'String',
95
+				'end_date',
96
+				esc_html__('End time/date of Event', 'event_espresso')
97
+			),
98
+			new GraphQLField(
99
+				'startTime',
100
+				'String',
101
+				'start_time',
102
+				esc_html__('Start time of Event', 'event_espresso')
103
+			),
104
+			new GraphQLField(
105
+				'endTime',
106
+				'String',
107
+				'end_time',
108
+				esc_html__('End time of Event', 'event_espresso')
109
+			),
110
+			new GraphQLField(
111
+				'capacity',
112
+				'Int',
113
+				'reg_limit',
114
+				esc_html__('Registration Limit for this time', 'event_espresso'),
115
+				[$this, 'parseInfiniteValue']
116
+			),
117
+			new GraphQLField(
118
+				'sold',
119
+				'Int',
120
+				'sold',
121
+				esc_html__('How many sales for this Datetime that have occurred', 'event_espresso')
122
+			),
123
+			new GraphQLField(
124
+				'reserved',
125
+				'Int',
126
+				'reserved',
127
+				esc_html__('Quantity of tickets reserved, but not yet fully purchased', 'event_espresso')
128
+			),
129
+			new GraphQLField(
130
+				'order',
131
+				'Int',
132
+				'order',
133
+				esc_html__('The order in which the Datetime is displayed', 'event_espresso')
134
+			),
135
+			new GraphQLField(
136
+				'length',
137
+				'Int',
138
+				'length',
139
+				esc_html__('The length of the event (start to end time) in seconds', 'event_espresso')
140
+			),
141
+			new GraphQLOutputField(
142
+				'parent',
143
+				$this->name(),
144
+				null,
145
+				esc_html__('The parent datetime of the current datetime', 'event_espresso')
146
+			),
147
+			new GraphQLInputField(
148
+				'parent',
149
+				'ID',
150
+				null,
151
+				esc_html__('The parent datetime ID', 'event_espresso')
152
+			),
153
+			new GraphQLField(
154
+				'isPrimary',
155
+				'Boolean',
156
+				'is_primary',
157
+				esc_html__('Flag indicating datetime is primary one for event', 'event_espresso')
158
+			),
159
+			new GraphQLField(
160
+				'isSoldOut',
161
+				'Boolean',
162
+				'sold_out',
163
+				esc_html__(
164
+					'Flag indicating whether the tickets sold for this datetime, met or exceed the registration limit',
165
+					'event_espresso'
166
+				)
167
+			),
168
+			new GraphQLField(
169
+				'isUpcoming',
170
+				'Boolean',
171
+				'is_upcoming',
172
+				esc_html__('Whether the date is upcoming', 'event_espresso')
173
+			),
174
+			new GraphQLField(
175
+				'isActive',
176
+				'Boolean',
177
+				'is_active',
178
+				esc_html__('Flag indicating datetime is active', 'event_espresso')
179
+			),
180
+			new GraphQLField(
181
+				'isExpired',
182
+				'Boolean',
183
+				'is_expired',
184
+				esc_html__('Flag indicating datetime is expired or not', 'event_espresso')
185
+			),
186
+			new GraphQLOutputField(
187
+				'event',
188
+				'Event',
189
+				null,
190
+				esc_html__('Event of the datetime.', 'event_espresso')
191
+			),
192
+			new GraphQLInputField(
193
+				'eventId',
194
+				'Int',
195
+				null,
196
+				esc_html__('Event ID of the datetime.', 'event_espresso')
197
+			),
198
+			new GraphQLInputField(
199
+				'event',
200
+				'ID',
201
+				null,
202
+				esc_html__('Globally uqinue event ID of the datetime.', 'event_espresso')
203
+			),
204
+			new GraphQLInputField(
205
+				'tickets',
206
+				['list_of' => 'ID'],
207
+				null,
208
+				sprintf(
209
+					'%1$s %2$s',
210
+					esc_html__('Globally uqinue IDs of the tickets related to the datetime.', 'event_espresso'),
211
+					esc_html__('Ignored if empty.', 'event_espresso')
212
+				)
213
+			),
214
+		];
215
+	}
216 216
 
217 217
 
218
-    /**
219
-     * @param array $inputFields The mutation input fields.
220
-     * @throws InvalidArgumentException
221
-     * @throws ReflectionException
222
-     * @since $VID:$
223
-     */
224
-    public function registerMutations(array $inputFields)
225
-    {
226
-        // Register mutation to update an entity.
227
-        register_graphql_mutation(
228
-            'update' . $this->name(),
229
-            [
230
-                'inputFields'         => $inputFields,
231
-                'outputFields'        => [
232
-                    lcfirst($this->name()) => [
233
-                        'type'    => $this->name(),
234
-                        'resolve' => [$this, 'resolveFromPayload'],
235
-                    ],
236
-                ],
237
-                'mutateAndGetPayload' => DatetimeUpdate::mutateAndGetPayload($this->model, $this),
238
-            ]
239
-        );
240
-        // Register mutation to delete an entity.
241
-        register_graphql_mutation(
242
-            'delete' . $this->name(),
243
-            [
244
-                'inputFields'         => [
245
-                    'id'                => $inputFields['id'],
246
-                    'deletePermanently' => [
247
-                        'type'        => 'Boolean',
248
-                        'description' => esc_html__('Whether to delete the entity permanently.', 'event_espresso'),
249
-                    ],
250
-                ],
251
-                'outputFields'        => [
252
-                    lcfirst($this->name()) => [
253
-                        'type'        => $this->name(),
254
-                        'description' => esc_html__('The object before it was deleted', 'event_espresso'),
255
-                        'resolve'     => static function ($payload) {
256
-                            $deleted = (object) $payload['deleted'];
218
+	/**
219
+	 * @param array $inputFields The mutation input fields.
220
+	 * @throws InvalidArgumentException
221
+	 * @throws ReflectionException
222
+	 * @since $VID:$
223
+	 */
224
+	public function registerMutations(array $inputFields)
225
+	{
226
+		// Register mutation to update an entity.
227
+		register_graphql_mutation(
228
+			'update' . $this->name(),
229
+			[
230
+				'inputFields'         => $inputFields,
231
+				'outputFields'        => [
232
+					lcfirst($this->name()) => [
233
+						'type'    => $this->name(),
234
+						'resolve' => [$this, 'resolveFromPayload'],
235
+					],
236
+				],
237
+				'mutateAndGetPayload' => DatetimeUpdate::mutateAndGetPayload($this->model, $this),
238
+			]
239
+		);
240
+		// Register mutation to delete an entity.
241
+		register_graphql_mutation(
242
+			'delete' . $this->name(),
243
+			[
244
+				'inputFields'         => [
245
+					'id'                => $inputFields['id'],
246
+					'deletePermanently' => [
247
+						'type'        => 'Boolean',
248
+						'description' => esc_html__('Whether to delete the entity permanently.', 'event_espresso'),
249
+					],
250
+				],
251
+				'outputFields'        => [
252
+					lcfirst($this->name()) => [
253
+						'type'        => $this->name(),
254
+						'description' => esc_html__('The object before it was deleted', 'event_espresso'),
255
+						'resolve'     => static function ($payload) {
256
+							$deleted = (object) $payload['deleted'];
257 257
 
258
-                            return ! empty($deleted) ? $deleted : null;
259
-                        },
260
-                    ],
261
-                ],
262
-                'mutateAndGetPayload' => DatetimeDelete::mutateAndGetPayload($this->model, $this),
263
-            ]
264
-        );
258
+							return ! empty($deleted) ? $deleted : null;
259
+						},
260
+					],
261
+				],
262
+				'mutateAndGetPayload' => DatetimeDelete::mutateAndGetPayload($this->model, $this),
263
+			]
264
+		);
265 265
 
266
-        // remove primary key from input.
267
-        unset($inputFields['id']);
268
-        // Register mutation to update an entity.
269
-        register_graphql_mutation(
270
-            'create' . $this->name(),
271
-            [
272
-                'inputFields'         => $inputFields,
273
-                'outputFields'        => [
274
-                    lcfirst($this->name()) => [
275
-                        'type'    => $this->name(),
276
-                        'resolve' => [$this, 'resolveFromPayload'],
277
-                    ],
278
-                ],
279
-                'mutateAndGetPayload' => DatetimeCreate::mutateAndGetPayload($this->model, $this),
280
-            ]
281
-        );
282
-    }
266
+		// remove primary key from input.
267
+		unset($inputFields['id']);
268
+		// Register mutation to update an entity.
269
+		register_graphql_mutation(
270
+			'create' . $this->name(),
271
+			[
272
+				'inputFields'         => $inputFields,
273
+				'outputFields'        => [
274
+					lcfirst($this->name()) => [
275
+						'type'    => $this->name(),
276
+						'resolve' => [$this, 'resolveFromPayload'],
277
+					],
278
+				],
279
+				'mutateAndGetPayload' => DatetimeCreate::mutateAndGetPayload($this->model, $this),
280
+			]
281
+		);
282
+	}
283 283
 }
Please login to merge, or discard this patch.
core/domain/services/graphql/types/Price.php 2 patches
Indentation   +124 added lines, -124 removed lines patch added patch discarded remove patch
@@ -22,130 +22,130 @@
 block discarded – undo
22 22
 class Price extends TypeBase
23 23
 {
24 24
 
25
-    /**
26
-     * Price constructor.
27
-     *
28
-     * @param EEM_Price $price_model
29
-     */
30
-    public function __construct(EEM_Price $price_model)
31
-    {
32
-        $this->model = $price_model;
33
-        $this->setName('Price');
34
-        $this->setDescription(__('A price.', 'event_espresso'));
35
-        $this->setIsCustomPostType(false);
36
-        parent::__construct();
37
-    }
25
+	/**
26
+	 * Price constructor.
27
+	 *
28
+	 * @param EEM_Price $price_model
29
+	 */
30
+	public function __construct(EEM_Price $price_model)
31
+	{
32
+		$this->model = $price_model;
33
+		$this->setName('Price');
34
+		$this->setDescription(__('A price.', 'event_espresso'));
35
+		$this->setIsCustomPostType(false);
36
+		parent::__construct();
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * @return GraphQLFieldInterface[]
42
-     * @since $VID:$
43
-     */
44
-    public function getFields()
45
-    {
46
-        return [
47
-            new GraphQLField(
48
-                'id',
49
-                ['non_null' => 'ID'],
50
-                null,
51
-                esc_html__('The globally unique ID for the object.', 'event_espresso')
52
-            ),
53
-            new GraphQLOutputField(
54
-                lcfirst($this->name()) . 'Id',
55
-                ['non_null' => 'Int'],
56
-                'ID',
57
-                esc_html__('Price ID', 'event_espresso')
58
-            ),
59
-            new GraphQLField(
60
-                'name',
61
-                'String',
62
-                'name',
63
-                esc_html__('Price Name', 'event_espresso')
64
-            ),
65
-            new GraphQLField(
66
-                'amount',
67
-                'Float',
68
-                'amount',
69
-                esc_html__('Price Amount', 'event_espresso')
70
-            ),
71
-            new GraphQLField(
72
-                'desc',
73
-                'String',
74
-                'desc',
75
-                esc_html__('Price description', 'event_espresso')
76
-            ),
77
-            new GraphQLField(
78
-                'overrides',
79
-                'Int',
80
-                'overrides',
81
-                esc_html__('Price ID for a global Price that will be overridden by this Price.', 'event_espresso')
82
-            ),
83
-            new GraphQLField(
84
-                'order',
85
-                'Int',
86
-                'order',
87
-                esc_html__('Order of Application of Price.', 'event_espresso')
88
-            ),
89
-            new GraphQLOutputField(
90
-                'parent',
91
-                $this->name(),
92
-                null,
93
-                esc_html__('The parent price of the current price', 'event_espresso')
94
-            ),
95
-            new GraphQLOutputField(
96
-                'priceType',
97
-                'PriceType',
98
-                'type_obj',
99
-                esc_html__('The related price type object.', 'event_espresso')
100
-            ),
101
-            new GraphQLInputField(
102
-                'parent',
103
-                'ID',
104
-                null,
105
-                esc_html__('The parent price ID', 'event_espresso')
106
-            ),
107
-            new GraphQLField(
108
-                'isDeleted',
109
-                'Boolean',
110
-                'deleted',
111
-                esc_html__('Flag indicating price has been trashed.', 'event_espresso')
112
-            ),
113
-            new GraphQLField(
114
-                'isDefault',
115
-                'Boolean',
116
-                'is_default',
117
-                esc_html__('Flag indicating price is the default one.', 'event_espresso')
118
-            ),
119
-            new GraphQLField(
120
-                'isPercent',
121
-                'Boolean',
122
-                'is_percent',
123
-                esc_html__('Flag indicating price is a percentage.', 'event_espresso')
124
-            ),
125
-            new GraphQLField(
126
-                'isBasePrice',
127
-                'Boolean',
128
-                'is_base_price',
129
-                esc_html__('Flag indicating price is a base price type.', 'event_espresso')
130
-            ),
131
-            new GraphQLOutputField(
132
-                'isDiscount',
133
-                'Boolean',
134
-                'is_discount',
135
-                esc_html__('Flag indicating price is a discount.', 'event_espresso')
136
-            ),
137
-            new GraphQLOutputField(
138
-                'wpUser',
139
-                'User',
140
-                null,
141
-                esc_html__('Price Creator', 'event_espresso')
142
-            ),
143
-            new GraphQLInputField(
144
-                'wpUser',
145
-                'Int',
146
-                null,
147
-                esc_html__('Price Creator ID', 'event_espresso')
148
-            ),
149
-        ];
150
-    }
40
+	/**
41
+	 * @return GraphQLFieldInterface[]
42
+	 * @since $VID:$
43
+	 */
44
+	public function getFields()
45
+	{
46
+		return [
47
+			new GraphQLField(
48
+				'id',
49
+				['non_null' => 'ID'],
50
+				null,
51
+				esc_html__('The globally unique ID for the object.', 'event_espresso')
52
+			),
53
+			new GraphQLOutputField(
54
+				lcfirst($this->name()) . 'Id',
55
+				['non_null' => 'Int'],
56
+				'ID',
57
+				esc_html__('Price ID', 'event_espresso')
58
+			),
59
+			new GraphQLField(
60
+				'name',
61
+				'String',
62
+				'name',
63
+				esc_html__('Price Name', 'event_espresso')
64
+			),
65
+			new GraphQLField(
66
+				'amount',
67
+				'Float',
68
+				'amount',
69
+				esc_html__('Price Amount', 'event_espresso')
70
+			),
71
+			new GraphQLField(
72
+				'desc',
73
+				'String',
74
+				'desc',
75
+				esc_html__('Price description', 'event_espresso')
76
+			),
77
+			new GraphQLField(
78
+				'overrides',
79
+				'Int',
80
+				'overrides',
81
+				esc_html__('Price ID for a global Price that will be overridden by this Price.', 'event_espresso')
82
+			),
83
+			new GraphQLField(
84
+				'order',
85
+				'Int',
86
+				'order',
87
+				esc_html__('Order of Application of Price.', 'event_espresso')
88
+			),
89
+			new GraphQLOutputField(
90
+				'parent',
91
+				$this->name(),
92
+				null,
93
+				esc_html__('The parent price of the current price', 'event_espresso')
94
+			),
95
+			new GraphQLOutputField(
96
+				'priceType',
97
+				'PriceType',
98
+				'type_obj',
99
+				esc_html__('The related price type object.', 'event_espresso')
100
+			),
101
+			new GraphQLInputField(
102
+				'parent',
103
+				'ID',
104
+				null,
105
+				esc_html__('The parent price ID', 'event_espresso')
106
+			),
107
+			new GraphQLField(
108
+				'isDeleted',
109
+				'Boolean',
110
+				'deleted',
111
+				esc_html__('Flag indicating price has been trashed.', 'event_espresso')
112
+			),
113
+			new GraphQLField(
114
+				'isDefault',
115
+				'Boolean',
116
+				'is_default',
117
+				esc_html__('Flag indicating price is the default one.', 'event_espresso')
118
+			),
119
+			new GraphQLField(
120
+				'isPercent',
121
+				'Boolean',
122
+				'is_percent',
123
+				esc_html__('Flag indicating price is a percentage.', 'event_espresso')
124
+			),
125
+			new GraphQLField(
126
+				'isBasePrice',
127
+				'Boolean',
128
+				'is_base_price',
129
+				esc_html__('Flag indicating price is a base price type.', 'event_espresso')
130
+			),
131
+			new GraphQLOutputField(
132
+				'isDiscount',
133
+				'Boolean',
134
+				'is_discount',
135
+				esc_html__('Flag indicating price is a discount.', 'event_espresso')
136
+			),
137
+			new GraphQLOutputField(
138
+				'wpUser',
139
+				'User',
140
+				null,
141
+				esc_html__('Price Creator', 'event_espresso')
142
+			),
143
+			new GraphQLInputField(
144
+				'wpUser',
145
+				'Int',
146
+				null,
147
+				esc_html__('Price Creator ID', 'event_espresso')
148
+			),
149
+		];
150
+	}
151 151
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 esc_html__('The globally unique ID for the object.', 'event_espresso')
52 52
             ),
53 53
             new GraphQLOutputField(
54
-                lcfirst($this->name()) . 'Id',
54
+                lcfirst($this->name()).'Id',
55 55
                 ['non_null' => 'Int'],
56 56
                 'ID',
57 57
                 esc_html__('Price ID', 'event_espresso')
Please login to merge, or discard this patch.
core/domain/services/graphql/types/Ticket.php 1 patch
Indentation   +269 added lines, -269 removed lines patch added patch discarded remove patch
@@ -25,279 +25,279 @@
 block discarded – undo
25 25
 class Ticket extends TypeBase
26 26
 {
27 27
 
28
-    /**
29
-     * Ticket constructor.
30
-     *
31
-     * @param EEM_Ticket $ticket_model
32
-     */
33
-    public function __construct(EEM_Ticket $ticket_model)
34
-    {
35
-        $this->model = $ticket_model;
36
-        $this->setName('Ticket');
37
-        $this->setDescription(__('A ticket for an event date', 'event_espresso'));
38
-        $this->setIsCustomPostType(false);
39
-        parent::__construct();
40
-    }
28
+	/**
29
+	 * Ticket constructor.
30
+	 *
31
+	 * @param EEM_Ticket $ticket_model
32
+	 */
33
+	public function __construct(EEM_Ticket $ticket_model)
34
+	{
35
+		$this->model = $ticket_model;
36
+		$this->setName('Ticket');
37
+		$this->setDescription(__('A ticket for an event date', 'event_espresso'));
38
+		$this->setIsCustomPostType(false);
39
+		parent::__construct();
40
+	}
41 41
 
42 42
 
43
-    /**
44
-     * @return GraphQLFieldInterface[]
45
-     * @since $VID:$
46
-     */
47
-    public function getFields()
48
-    {
49
-        return [
50
-            new GraphQLField(
51
-                'id',
52
-                ['non_null' => 'ID'],
53
-                null,
54
-                esc_html__('The globally unique ID for the object.', 'event_espresso')
55
-            ),
56
-            new GraphQLOutputField(
57
-                lcfirst($this->name()) . 'Id',
58
-                ['non_null' => 'Int'],
59
-                'ID',
60
-                esc_html__('Ticket ID', 'event_espresso')
61
-            ),
62
-            new GraphQLField(
63
-                'name',
64
-                'String',
65
-                'name',
66
-                esc_html__('Ticket Name', 'event_espresso')
67
-            ),
68
-            new GraphQLField(
69
-                'description',
70
-                'String',
71
-                'description',
72
-                esc_html__('Description of Ticket', 'event_espresso')
73
-            ),
74
-            new GraphQLField(
75
-                'startDate',
76
-                'String',
77
-                'start_date',
78
-                esc_html__('Start time/date of Ticket', 'event_espresso')
79
-            ),
80
-            new GraphQLField(
81
-                'endDate',
82
-                'String',
83
-                'end_date',
84
-                esc_html__('End time/date of Ticket', 'event_espresso')
85
-            ),
86
-            new GraphQLField(
87
-                'min',
88
-                'Int',
89
-                'min',
90
-                esc_html__('Minimum quantity of this ticket that must be purchased', 'event_espresso')
91
-            ),
92
-            new GraphQLField(
93
-                'max',
94
-                'Int',
95
-                'max',
96
-                esc_html__(
97
-                    'Maximum quantity of this ticket that can be purchased in one transaction',
98
-                    'event_espresso'
99
-                ),
100
-                [$this, 'parseInfiniteValue']
101
-            ),
102
-            new GraphQLField(
103
-                'price',
104
-                'Float',
105
-                'price',
106
-                esc_html__('Final calculated price for ticket', 'event_espresso')
107
-            ),
108
-            new GraphQLOutputField(
109
-                'prices',
110
-                ['list_of' => 'Price'],
111
-                'prices',
112
-                esc_html__('The related ticket prices.', 'event_espresso')
113
-            ),
114
-            new GraphQLField(
115
-                'sold',
116
-                'Int',
117
-                'sold',
118
-                esc_html__('Number of this ticket sold', 'event_espresso')
119
-            ),
120
-            new GraphQLField(
121
-                'quantity',
122
-                'Int',
123
-                'qty',
124
-                esc_html__('Quantity of this ticket that is available', 'event_espresso'),
125
-                [$this, 'parseInfiniteValue']
126
-            ),
127
-            new GraphQLField(
128
-                'reserved',
129
-                'Int',
130
-                'reserved',
131
-                esc_html__(
132
-                    'Quantity of this ticket that is reserved, but not yet fully purchased',
133
-                    'event_espresso'
134
-                )
135
-            ),
136
-            new GraphQLField(
137
-                'uses',
138
-                'Int',
139
-                'uses',
140
-                esc_html__('Number of datetimes this ticket can be used at', 'event_espresso'),
141
-                [$this, 'parseInfiniteValue']
142
-            ),
143
-            new GraphQLField(
144
-                'isRequired',
145
-                'Boolean',
146
-                'required',
147
-                esc_html__(
148
-                    'Flag indicating whether this ticket must be purchased with a transaction',
149
-                    'event_espresso'
150
-                )
151
-            ),
152
-            new GraphQLField(
153
-                'isTaxable',
154
-                'Boolean',
155
-                'taxable',
156
-                esc_html__(
157
-                    'Flag indicating whether there is tax applied on this ticket',
158
-                    'event_espresso'
159
-                )
160
-            ),
161
-            new GraphQLField(
162
-                'isDefault',
163
-                'Boolean',
164
-                'is_default',
165
-                esc_html__('Flag indicating that this ticket is a default ticket', 'event_espresso')
166
-            ),
167
-            new GraphQLField(
168
-                'order',
169
-                'Int',
170
-                'order',
171
-                esc_html__('The order in which the Datetime is displayed', 'event_espresso')
172
-            ),
173
-            new GraphQLField(
174
-                'row',
175
-                'Int',
176
-                'row',
177
-                esc_html__('How tickets are displayed in the ui', 'event_espresso')
178
-            ),
179
-            new GraphQLOutputField(
180
-                'wpUser',
181
-                'User',
182
-                null,
183
-                esc_html__('Ticket Creator', 'event_espresso')
184
-            ),
185
-            new GraphQLInputField(
186
-                'wpUser',
187
-                'Int',
188
-                null,
189
-                esc_html__('Ticket Creator ID', 'event_espresso')
190
-            ),
191
-            new GraphQLOutputField(
192
-                'parent',
193
-                $this->name(),
194
-                null,
195
-                esc_html__('The parent ticket of the current ticket', 'event_espresso')
196
-            ),
197
-            new GraphQLInputField(
198
-                'parent',
199
-                'ID',
200
-                null,
201
-                esc_html__('The parent ticket ID', 'event_espresso')
202
-            ),
203
-            new GraphQLField(
204
-                'reverseCalculate',
205
-                'Boolean',
206
-                'reverse_calculate',
207
-                esc_html__(
208
-                    'Flag indicating whether ticket calculations should run in reverse and calculate the base ticket price from the provided ticket total.',
209
-                    'event_espresso'
210
-                )
211
-            ),
212
-            new GraphQLField(
213
-                'isFree',
214
-                'Boolean',
215
-                'is_free',
216
-                esc_html__('Flag indicating whether the ticket is free.', 'event_espresso')
217
-            ),
218
-            new GraphQLOutputField(
219
-                'event',
220
-                'Event',
221
-                null,
222
-                esc_html__('Event of the ticket.', 'event_espresso')
223
-            ),
224
-            new GraphQLInputField(
225
-                'datetimes',
226
-                ['list_of' => 'ID'],
227
-                null,
228
-                sprintf(
229
-                    '%1$s %2$s',
230
-                    esc_html__('Globally unique IDs of the datetimes related to the ticket.', 'event_espresso'),
231
-                    esc_html__('Ignored if empty.', 'event_espresso')
232
-                )
233
-            ),
234
-        ];
235
-    }
43
+	/**
44
+	 * @return GraphQLFieldInterface[]
45
+	 * @since $VID:$
46
+	 */
47
+	public function getFields()
48
+	{
49
+		return [
50
+			new GraphQLField(
51
+				'id',
52
+				['non_null' => 'ID'],
53
+				null,
54
+				esc_html__('The globally unique ID for the object.', 'event_espresso')
55
+			),
56
+			new GraphQLOutputField(
57
+				lcfirst($this->name()) . 'Id',
58
+				['non_null' => 'Int'],
59
+				'ID',
60
+				esc_html__('Ticket ID', 'event_espresso')
61
+			),
62
+			new GraphQLField(
63
+				'name',
64
+				'String',
65
+				'name',
66
+				esc_html__('Ticket Name', 'event_espresso')
67
+			),
68
+			new GraphQLField(
69
+				'description',
70
+				'String',
71
+				'description',
72
+				esc_html__('Description of Ticket', 'event_espresso')
73
+			),
74
+			new GraphQLField(
75
+				'startDate',
76
+				'String',
77
+				'start_date',
78
+				esc_html__('Start time/date of Ticket', 'event_espresso')
79
+			),
80
+			new GraphQLField(
81
+				'endDate',
82
+				'String',
83
+				'end_date',
84
+				esc_html__('End time/date of Ticket', 'event_espresso')
85
+			),
86
+			new GraphQLField(
87
+				'min',
88
+				'Int',
89
+				'min',
90
+				esc_html__('Minimum quantity of this ticket that must be purchased', 'event_espresso')
91
+			),
92
+			new GraphQLField(
93
+				'max',
94
+				'Int',
95
+				'max',
96
+				esc_html__(
97
+					'Maximum quantity of this ticket that can be purchased in one transaction',
98
+					'event_espresso'
99
+				),
100
+				[$this, 'parseInfiniteValue']
101
+			),
102
+			new GraphQLField(
103
+				'price',
104
+				'Float',
105
+				'price',
106
+				esc_html__('Final calculated price for ticket', 'event_espresso')
107
+			),
108
+			new GraphQLOutputField(
109
+				'prices',
110
+				['list_of' => 'Price'],
111
+				'prices',
112
+				esc_html__('The related ticket prices.', 'event_espresso')
113
+			),
114
+			new GraphQLField(
115
+				'sold',
116
+				'Int',
117
+				'sold',
118
+				esc_html__('Number of this ticket sold', 'event_espresso')
119
+			),
120
+			new GraphQLField(
121
+				'quantity',
122
+				'Int',
123
+				'qty',
124
+				esc_html__('Quantity of this ticket that is available', 'event_espresso'),
125
+				[$this, 'parseInfiniteValue']
126
+			),
127
+			new GraphQLField(
128
+				'reserved',
129
+				'Int',
130
+				'reserved',
131
+				esc_html__(
132
+					'Quantity of this ticket that is reserved, but not yet fully purchased',
133
+					'event_espresso'
134
+				)
135
+			),
136
+			new GraphQLField(
137
+				'uses',
138
+				'Int',
139
+				'uses',
140
+				esc_html__('Number of datetimes this ticket can be used at', 'event_espresso'),
141
+				[$this, 'parseInfiniteValue']
142
+			),
143
+			new GraphQLField(
144
+				'isRequired',
145
+				'Boolean',
146
+				'required',
147
+				esc_html__(
148
+					'Flag indicating whether this ticket must be purchased with a transaction',
149
+					'event_espresso'
150
+				)
151
+			),
152
+			new GraphQLField(
153
+				'isTaxable',
154
+				'Boolean',
155
+				'taxable',
156
+				esc_html__(
157
+					'Flag indicating whether there is tax applied on this ticket',
158
+					'event_espresso'
159
+				)
160
+			),
161
+			new GraphQLField(
162
+				'isDefault',
163
+				'Boolean',
164
+				'is_default',
165
+				esc_html__('Flag indicating that this ticket is a default ticket', 'event_espresso')
166
+			),
167
+			new GraphQLField(
168
+				'order',
169
+				'Int',
170
+				'order',
171
+				esc_html__('The order in which the Datetime is displayed', 'event_espresso')
172
+			),
173
+			new GraphQLField(
174
+				'row',
175
+				'Int',
176
+				'row',
177
+				esc_html__('How tickets are displayed in the ui', 'event_espresso')
178
+			),
179
+			new GraphQLOutputField(
180
+				'wpUser',
181
+				'User',
182
+				null,
183
+				esc_html__('Ticket Creator', 'event_espresso')
184
+			),
185
+			new GraphQLInputField(
186
+				'wpUser',
187
+				'Int',
188
+				null,
189
+				esc_html__('Ticket Creator ID', 'event_espresso')
190
+			),
191
+			new GraphQLOutputField(
192
+				'parent',
193
+				$this->name(),
194
+				null,
195
+				esc_html__('The parent ticket of the current ticket', 'event_espresso')
196
+			),
197
+			new GraphQLInputField(
198
+				'parent',
199
+				'ID',
200
+				null,
201
+				esc_html__('The parent ticket ID', 'event_espresso')
202
+			),
203
+			new GraphQLField(
204
+				'reverseCalculate',
205
+				'Boolean',
206
+				'reverse_calculate',
207
+				esc_html__(
208
+					'Flag indicating whether ticket calculations should run in reverse and calculate the base ticket price from the provided ticket total.',
209
+					'event_espresso'
210
+				)
211
+			),
212
+			new GraphQLField(
213
+				'isFree',
214
+				'Boolean',
215
+				'is_free',
216
+				esc_html__('Flag indicating whether the ticket is free.', 'event_espresso')
217
+			),
218
+			new GraphQLOutputField(
219
+				'event',
220
+				'Event',
221
+				null,
222
+				esc_html__('Event of the ticket.', 'event_espresso')
223
+			),
224
+			new GraphQLInputField(
225
+				'datetimes',
226
+				['list_of' => 'ID'],
227
+				null,
228
+				sprintf(
229
+					'%1$s %2$s',
230
+					esc_html__('Globally unique IDs of the datetimes related to the ticket.', 'event_espresso'),
231
+					esc_html__('Ignored if empty.', 'event_espresso')
232
+				)
233
+			),
234
+		];
235
+	}
236 236
 
237 237
 
238
-    /**
239
-     * @param array $inputFields The mutation input fields.
240
-     * @throws InvalidArgumentException
241
-     * @throws ReflectionException
242
-     * @since $VID:$
243
-     */
244
-    public function registerMutations(array $inputFields)
245
-    {
246
-        // Register mutation to update an entity.
247
-        register_graphql_mutation(
248
-            'update' . $this->name(),
249
-            [
250
-                'inputFields'         => $inputFields,
251
-                'outputFields'        => [
252
-                    lcfirst($this->name()) => [
253
-                        'type'    => $this->name(),
254
-                        'resolve' => [$this, 'resolveFromPayload'],
255
-                    ],
256
-                ],
257
-                'mutateAndGetPayload' => TicketUpdate::mutateAndGetPayload($this->model, $this),
258
-            ]
259
-        );
260
-        // Register mutation to delete an entity.
261
-        register_graphql_mutation(
262
-            'delete' . $this->name(),
263
-            [
264
-                'inputFields'         => [
265
-                    'id'                => $inputFields['id'],
266
-                    'deletePermanently' => [
267
-                        'type'        => 'Boolean',
268
-                        'description' => esc_html__('Whether to delete the entity permanently.', 'event_espresso'),
269
-                    ],
270
-                ],
271
-                'outputFields'        => [
272
-                    lcfirst($this->name()) => [
273
-                        'type'        => $this->name(),
274
-                        'description' => esc_html__('The object before it was deleted', 'event_espresso'),
275
-                        'resolve'     => static function ($payload) {
276
-                            $deleted = (object) $payload['deleted'];
238
+	/**
239
+	 * @param array $inputFields The mutation input fields.
240
+	 * @throws InvalidArgumentException
241
+	 * @throws ReflectionException
242
+	 * @since $VID:$
243
+	 */
244
+	public function registerMutations(array $inputFields)
245
+	{
246
+		// Register mutation to update an entity.
247
+		register_graphql_mutation(
248
+			'update' . $this->name(),
249
+			[
250
+				'inputFields'         => $inputFields,
251
+				'outputFields'        => [
252
+					lcfirst($this->name()) => [
253
+						'type'    => $this->name(),
254
+						'resolve' => [$this, 'resolveFromPayload'],
255
+					],
256
+				],
257
+				'mutateAndGetPayload' => TicketUpdate::mutateAndGetPayload($this->model, $this),
258
+			]
259
+		);
260
+		// Register mutation to delete an entity.
261
+		register_graphql_mutation(
262
+			'delete' . $this->name(),
263
+			[
264
+				'inputFields'         => [
265
+					'id'                => $inputFields['id'],
266
+					'deletePermanently' => [
267
+						'type'        => 'Boolean',
268
+						'description' => esc_html__('Whether to delete the entity permanently.', 'event_espresso'),
269
+					],
270
+				],
271
+				'outputFields'        => [
272
+					lcfirst($this->name()) => [
273
+						'type'        => $this->name(),
274
+						'description' => esc_html__('The object before it was deleted', 'event_espresso'),
275
+						'resolve'     => static function ($payload) {
276
+							$deleted = (object) $payload['deleted'];
277 277
 
278
-                            return ! empty($deleted) ? $deleted : null;
279
-                        },
280
-                    ],
281
-                ],
282
-                'mutateAndGetPayload' => TicketDelete::mutateAndGetPayload($this->model, $this),
283
-            ]
284
-        );
278
+							return ! empty($deleted) ? $deleted : null;
279
+						},
280
+					],
281
+				],
282
+				'mutateAndGetPayload' => TicketDelete::mutateAndGetPayload($this->model, $this),
283
+			]
284
+		);
285 285
 
286
-        // remove primary key from input.
287
-        unset($inputFields['id']);
288
-        // Register mutation to update an entity.
289
-        register_graphql_mutation(
290
-            'create' . $this->name(),
291
-            [
292
-                'inputFields'         => $inputFields,
293
-                'outputFields'        => [
294
-                    lcfirst($this->name()) => [
295
-                        'type'    => $this->name(),
296
-                        'resolve' => [$this, 'resolveFromPayload'],
297
-                    ],
298
-                ],
299
-                'mutateAndGetPayload' => TicketCreate::mutateAndGetPayload($this->model, $this),
300
-            ]
301
-        );
302
-    }
286
+		// remove primary key from input.
287
+		unset($inputFields['id']);
288
+		// Register mutation to update an entity.
289
+		register_graphql_mutation(
290
+			'create' . $this->name(),
291
+			[
292
+				'inputFields'         => $inputFields,
293
+				'outputFields'        => [
294
+					lcfirst($this->name()) => [
295
+						'type'    => $this->name(),
296
+						'resolve' => [$this, 'resolveFromPayload'],
297
+					],
298
+				],
299
+				'mutateAndGetPayload' => TicketCreate::mutateAndGetPayload($this->model, $this),
300
+			]
301
+		);
302
+	}
303 303
 }
Please login to merge, or discard this patch.
core/EE_Dependency_Map.core.php 1 patch
Indentation   +1215 added lines, -1215 removed lines patch added patch discarded remove patch
@@ -21,1219 +21,1219 @@
 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\Price' => [
940
-                'EEM_Price' => EE_Dependency_Map::load_from_cache,
941
-            ],
942
-            'EventEspresso\core\domain\services\graphql\types\PriceType' => [
943
-                'EEM_Price_Type' => EE_Dependency_Map::load_from_cache,
944
-            ],
945
-            'EventEspresso\core\domain\services\graphql\types\Venue' => [
946
-                'EEM_Venue' => EE_Dependency_Map::load_from_cache,
947
-            ],
948
-            'EventEspresso\core\domain\services\graphql\types\State' => [
949
-                'EEM_State' => EE_Dependency_Map::load_from_cache,
950
-            ],
951
-            'EventEspresso\core\domain\services\graphql\types\Country' => [
952
-                'EEM_Country' => EE_Dependency_Map::load_from_cache,
953
-            ],
954
-            'EventEspresso\core\domain\services\graphql\connections\EventDatetimesConnection' => [
955
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
956
-            ],
957
-            'EventEspresso\core\domain\services\graphql\connections\RootQueryDatetimesConnection' => [
958
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
959
-            ],
960
-            'EventEspresso\core\domain\services\graphql\connections\DatetimeTicketsConnection' => [
961
-                'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
962
-            ],
963
-            'EventEspresso\core\domain\services\graphql\connections\RootQueryTicketsConnection' => [
964
-                'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
965
-            ],
966
-            'EventEspresso\core\domain\services\graphql\connections\TicketDatetimesConnection' => [
967
-                'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
968
-            ],
969
-            'EventEspresso\core\domain\services\graphql\connections\EventVenuesConnection' => [
970
-                'EEM_Venue' => EE_Dependency_Map::load_from_cache,
971
-            ],
972
-        );
973
-    }
974
-
975
-
976
-    /**
977
-     * Registers how core classes are loaded.
978
-     * This can either be done by simply providing the name of one of the EE_Registry loader methods such as:
979
-     *        'EE_Request_Handler' => 'load_core'
980
-     *        'EE_Messages_Queue'  => 'load_lib'
981
-     *        'EEH_Debug_Tools'    => 'load_helper'
982
-     * or, if greater control is required, by providing a custom closure. For example:
983
-     *        'Some_Class' => function () {
984
-     *            return new Some_Class();
985
-     *        },
986
-     * This is required for instantiating dependencies
987
-     * where an interface has been type hinted in a class constructor. For example:
988
-     *        'Required_Interface' => function () {
989
-     *            return new A_Class_That_Implements_Required_Interface();
990
-     *        },
991
-     */
992
-    protected function _register_core_class_loaders()
993
-    {
994
-        $this->_class_loaders = array(
995
-            // load_core
996
-            'EE_Dependency_Map'                            => function () {
997
-                return $this;
998
-            },
999
-            'EE_Capabilities'                              => 'load_core',
1000
-            'EE_Encryption'                                => 'load_core',
1001
-            'EE_Front_Controller'                          => 'load_core',
1002
-            'EE_Module_Request_Router'                     => 'load_core',
1003
-            'EE_Registry'                                  => 'load_core',
1004
-            'EE_Request'                                   => function () {
1005
-                return $this->legacy_request;
1006
-            },
1007
-            'EventEspresso\core\services\request\Request'  => function () {
1008
-                return $this->request;
1009
-            },
1010
-            'EventEspresso\core\services\request\Response' => function () {
1011
-                return $this->response;
1012
-            },
1013
-            'EE_Base'                                      => 'load_core',
1014
-            'EE_Request_Handler'                           => 'load_core',
1015
-            'EE_Session'                                   => 'load_core',
1016
-            'EE_Cron_Tasks'                                => 'load_core',
1017
-            'EE_System'                                    => 'load_core',
1018
-            'EE_Maintenance_Mode'                          => 'load_core',
1019
-            'EE_Register_CPTs'                             => 'load_core',
1020
-            'EE_Admin'                                     => 'load_core',
1021
-            'EE_CPT_Strategy'                              => 'load_core',
1022
-            // load_class
1023
-            'EE_Registration_Processor'                    => 'load_class',
1024
-            // load_lib
1025
-            'EE_Message_Resource_Manager'                  => 'load_lib',
1026
-            'EE_Message_Type_Collection'                   => 'load_lib',
1027
-            'EE_Message_Type_Collection_Loader'            => 'load_lib',
1028
-            'EE_Messenger_Collection'                      => 'load_lib',
1029
-            'EE_Messenger_Collection_Loader'               => 'load_lib',
1030
-            'EE_Messages_Processor'                        => 'load_lib',
1031
-            'EE_Message_Repository'                        => 'load_lib',
1032
-            'EE_Messages_Queue'                            => 'load_lib',
1033
-            'EE_Messages_Data_Handler_Collection'          => 'load_lib',
1034
-            'EE_Message_Template_Group_Collection'         => 'load_lib',
1035
-            'EE_Payment_Method_Manager'                    => 'load_lib',
1036
-            'EE_DMS_Core_4_1_0'                            => 'load_dms',
1037
-            'EE_DMS_Core_4_2_0'                            => 'load_dms',
1038
-            'EE_DMS_Core_4_3_0'                            => 'load_dms',
1039
-            'EE_DMS_Core_4_5_0'                            => 'load_dms',
1040
-            'EE_DMS_Core_4_6_0'                            => 'load_dms',
1041
-            'EE_DMS_Core_4_7_0'                            => 'load_dms',
1042
-            'EE_DMS_Core_4_8_0'                            => 'load_dms',
1043
-            'EE_DMS_Core_4_9_0'                            => 'load_dms',
1044
-            'EE_DMS_Core_4_10_0'                            => 'load_dms',
1045
-            'EE_Messages_Generator'                        => static function () {
1046
-                return EE_Registry::instance()->load_lib(
1047
-                    'Messages_Generator',
1048
-                    array(),
1049
-                    false,
1050
-                    false
1051
-                );
1052
-            },
1053
-            'EE_Messages_Template_Defaults'                => static function ($arguments = array()) {
1054
-                return EE_Registry::instance()->load_lib(
1055
-                    'Messages_Template_Defaults',
1056
-                    $arguments,
1057
-                    false,
1058
-                    false
1059
-                );
1060
-            },
1061
-            // load_helper
1062
-            'EEH_Parse_Shortcodes'                         => static function () {
1063
-                if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
1064
-                    return new EEH_Parse_Shortcodes();
1065
-                }
1066
-                return null;
1067
-            },
1068
-            'EE_Template_Config'                           => static function () {
1069
-                return EE_Config::instance()->template_settings;
1070
-            },
1071
-            'EE_Currency_Config'                           => static function () {
1072
-                return EE_Config::instance()->currency;
1073
-            },
1074
-            'EE_Registration_Config'                       => static function () {
1075
-                return EE_Config::instance()->registration;
1076
-            },
1077
-            'EE_Core_Config'                               => static function () {
1078
-                return EE_Config::instance()->core;
1079
-            },
1080
-            'EventEspresso\core\services\loaders\Loader'   => static function () {
1081
-                return LoaderFactory::getLoader();
1082
-            },
1083
-            'EE_Network_Config'                            => static function () {
1084
-                return EE_Network_Config::instance();
1085
-            },
1086
-            'EE_Config'                                    => static function () {
1087
-                return EE_Config::instance();
1088
-            },
1089
-            'EventEspresso\core\domain\Domain'             => static function () {
1090
-                return DomainFactory::getEventEspressoCoreDomain();
1091
-            },
1092
-            'EE_Admin_Config'                              => static function () {
1093
-                return EE_Config::instance()->admin;
1094
-            },
1095
-            'EE_Organization_Config'                       => static function () {
1096
-                return EE_Config::instance()->organization;
1097
-            },
1098
-            'EE_Network_Core_Config'                       => static function () {
1099
-                return EE_Network_Config::instance()->core;
1100
-            },
1101
-            'EE_Environment_Config'                        => static function () {
1102
-                return EE_Config::instance()->environment;
1103
-            },
1104
-            'EED_Core_Rest_Api'                            => static function () {
1105
-                return EED_Core_Rest_Api::instance();
1106
-            },
1107
-            'WP_REST_Server'                            => static function () {
1108
-                return rest_get_server();
1109
-            },
1110
-        );
1111
-    }
1112
-
1113
-
1114
-    /**
1115
-     * can be used for supplying alternate names for classes,
1116
-     * or for connecting interface names to instantiable classes
1117
-     *
1118
-     * @throws InvalidAliasException
1119
-     */
1120
-    protected function _register_core_aliases()
1121
-    {
1122
-        $aliases = array(
1123
-            'CommandBusInterface'                                                          => 'EventEspresso\core\services\commands\CommandBusInterface',
1124
-            'EventEspresso\core\services\commands\CommandBusInterface'                     => 'EventEspresso\core\services\commands\CommandBus',
1125
-            'CommandHandlerManagerInterface'                                               => 'EventEspresso\core\services\commands\CommandHandlerManagerInterface',
1126
-            'EventEspresso\core\services\commands\CommandHandlerManagerInterface'          => 'EventEspresso\core\services\commands\CommandHandlerManager',
1127
-            'CapChecker'                                                                   => 'EventEspresso\core\services\commands\middleware\CapChecker',
1128
-            'AddActionHook'                                                                => 'EventEspresso\core\services\commands\middleware\AddActionHook',
1129
-            'CapabilitiesChecker'                                                          => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1130
-            'CapabilitiesCheckerInterface'                                                 => 'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface',
1131
-            'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface' => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1132
-            'CreateRegistrationService'                                                    => 'EventEspresso\core\domain\services\registration\CreateRegistrationService',
1133
-            'CreateRegistrationCommandHandler'                                             => 'EventEspresso\core\services\commands\registration\CreateRegistrationCommand',
1134
-            'CopyRegistrationDetailsCommandHandler'                                        => 'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommand',
1135
-            'CopyRegistrationPaymentsCommandHandler'                                       => 'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommand',
1136
-            'CancelRegistrationAndTicketLineItemCommandHandler'                            => 'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler',
1137
-            'UpdateRegistrationAndTransactionAfterChangeCommandHandler'                    => 'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler',
1138
-            'CreateTicketLineItemCommandHandler'                                           => 'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommand',
1139
-            'CreateTransactionCommandHandler'                                              => 'EventEspresso\core\services\commands\transaction\CreateTransactionCommandHandler',
1140
-            'CreateAttendeeCommandHandler'                                                 => 'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler',
1141
-            'TableManager'                                                                 => 'EventEspresso\core\services\database\TableManager',
1142
-            'TableAnalysis'                                                                => 'EventEspresso\core\services\database\TableAnalysis',
1143
-            'EspressoShortcode'                                                            => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1144
-            'ShortcodeInterface'                                                           => 'EventEspresso\core\services\shortcodes\ShortcodeInterface',
1145
-            'EventEspresso\core\services\shortcodes\ShortcodeInterface'                    => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1146
-            'EventEspresso\core\services\cache\CacheStorageInterface'                      => 'EventEspresso\core\services\cache\TransientCacheStorage',
1147
-            'LoaderInterface'                                                              => 'EventEspresso\core\services\loaders\LoaderInterface',
1148
-            'EventEspresso\core\services\loaders\LoaderInterface'                          => 'EventEspresso\core\services\loaders\Loader',
1149
-            'CommandFactoryInterface'                                                      => 'EventEspresso\core\services\commands\CommandFactoryInterface',
1150
-            'EventEspresso\core\services\commands\CommandFactoryInterface'                 => 'EventEspresso\core\services\commands\CommandFactory',
1151
-            'EmailValidatorInterface'                                                      => 'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface',
1152
-            'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface'  => 'EventEspresso\core\domain\services\validation\email\EmailValidationService',
1153
-            'NoticeConverterInterface'                                                     => 'EventEspresso\core\services\notices\NoticeConverterInterface',
1154
-            'EventEspresso\core\services\notices\NoticeConverterInterface'                 => 'EventEspresso\core\services\notices\ConvertNoticesToEeErrors',
1155
-            'NoticesContainerInterface'                                                    => 'EventEspresso\core\services\notices\NoticesContainerInterface',
1156
-            'EventEspresso\core\services\notices\NoticesContainerInterface'                => 'EventEspresso\core\services\notices\NoticesContainer',
1157
-            'EventEspresso\core\services\request\RequestInterface'                         => 'EventEspresso\core\services\request\Request',
1158
-            'EventEspresso\core\services\request\ResponseInterface'                        => 'EventEspresso\core\services\request\Response',
1159
-            'EventEspresso\core\domain\DomainInterface'                                    => 'EventEspresso\core\domain\Domain',
1160
-            'Registration_Processor'                                                       => 'EE_Registration_Processor',
1161
-        );
1162
-        foreach ($aliases as $alias => $fqn) {
1163
-            if (is_array($fqn)) {
1164
-                foreach ($fqn as $class => $for_class) {
1165
-                    $this->class_cache->addAlias($class, $alias, $for_class);
1166
-                }
1167
-                continue;
1168
-            }
1169
-            $this->class_cache->addAlias($fqn, $alias);
1170
-        }
1171
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
1172
-            $this->class_cache->addAlias(
1173
-                'EventEspresso\core\services\notices\ConvertNoticesToAdminNotices',
1174
-                'EventEspresso\core\services\notices\NoticeConverterInterface'
1175
-            );
1176
-        }
1177
-    }
1178
-
1179
-
1180
-    /**
1181
-     * This is used to reset the internal map and class_loaders to their original default state at the beginning of the
1182
-     * request Primarily used by unit tests.
1183
-     */
1184
-    public function reset()
1185
-    {
1186
-        $this->_register_core_class_loaders();
1187
-        $this->_register_core_dependencies();
1188
-    }
1189
-
1190
-
1191
-    /**
1192
-     * PLZ NOTE: a better name for this method would be is_alias()
1193
-     * because it returns TRUE if the provided fully qualified name IS an alias
1194
-     * WHY?
1195
-     * Because if a class is type hinting for a concretion,
1196
-     * then why would we need to find another class to supply it?
1197
-     * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
1198
-     * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
1199
-     * Don't go looking for some substitute.
1200
-     * Whereas if a class is type hinting for an interface...
1201
-     * then we need to find an actual class to use.
1202
-     * So the interface IS the alias for some other FQN,
1203
-     * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
1204
-     * represents some other class.
1205
-     *
1206
-     * @deprecated 4.9.62.p
1207
-     * @param string $fqn
1208
-     * @param string $for_class
1209
-     * @return bool
1210
-     */
1211
-    public function has_alias($fqn = '', $for_class = '')
1212
-    {
1213
-        return $this->isAlias($fqn, $for_class);
1214
-    }
1215
-
1216
-
1217
-    /**
1218
-     * PLZ NOTE: a better name for this method would be get_fqn_for_alias()
1219
-     * because it returns a FQN for provided alias if one exists, otherwise returns the original $alias
1220
-     * functions recursively, so that multiple aliases can be used to drill down to a FQN
1221
-     *  for example:
1222
-     *      if the following two entries were added to the _aliases array:
1223
-     *          array(
1224
-     *              'interface_alias'           => 'some\namespace\interface'
1225
-     *              'some\namespace\interface'  => 'some\namespace\classname'
1226
-     *          )
1227
-     *      then one could use EE_Registry::instance()->create( 'interface_alias' )
1228
-     *      to load an instance of 'some\namespace\classname'
1229
-     *
1230
-     * @deprecated 4.9.62.p
1231
-     * @param string $alias
1232
-     * @param string $for_class
1233
-     * @return string
1234
-     */
1235
-    public function get_alias($alias = '', $for_class = '')
1236
-    {
1237
-        return $this->getFqnForAlias($alias, $for_class);
1238
-    }
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\Price' => [
940
+				'EEM_Price' => EE_Dependency_Map::load_from_cache,
941
+			],
942
+			'EventEspresso\core\domain\services\graphql\types\PriceType' => [
943
+				'EEM_Price_Type' => EE_Dependency_Map::load_from_cache,
944
+			],
945
+			'EventEspresso\core\domain\services\graphql\types\Venue' => [
946
+				'EEM_Venue' => EE_Dependency_Map::load_from_cache,
947
+			],
948
+			'EventEspresso\core\domain\services\graphql\types\State' => [
949
+				'EEM_State' => EE_Dependency_Map::load_from_cache,
950
+			],
951
+			'EventEspresso\core\domain\services\graphql\types\Country' => [
952
+				'EEM_Country' => EE_Dependency_Map::load_from_cache,
953
+			],
954
+			'EventEspresso\core\domain\services\graphql\connections\EventDatetimesConnection' => [
955
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
956
+			],
957
+			'EventEspresso\core\domain\services\graphql\connections\RootQueryDatetimesConnection' => [
958
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
959
+			],
960
+			'EventEspresso\core\domain\services\graphql\connections\DatetimeTicketsConnection' => [
961
+				'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
962
+			],
963
+			'EventEspresso\core\domain\services\graphql\connections\RootQueryTicketsConnection' => [
964
+				'EEM_Ticket' => EE_Dependency_Map::load_from_cache,
965
+			],
966
+			'EventEspresso\core\domain\services\graphql\connections\TicketDatetimesConnection' => [
967
+				'EEM_Datetime' => EE_Dependency_Map::load_from_cache,
968
+			],
969
+			'EventEspresso\core\domain\services\graphql\connections\EventVenuesConnection' => [
970
+				'EEM_Venue' => EE_Dependency_Map::load_from_cache,
971
+			],
972
+		);
973
+	}
974
+
975
+
976
+	/**
977
+	 * Registers how core classes are loaded.
978
+	 * This can either be done by simply providing the name of one of the EE_Registry loader methods such as:
979
+	 *        'EE_Request_Handler' => 'load_core'
980
+	 *        'EE_Messages_Queue'  => 'load_lib'
981
+	 *        'EEH_Debug_Tools'    => 'load_helper'
982
+	 * or, if greater control is required, by providing a custom closure. For example:
983
+	 *        'Some_Class' => function () {
984
+	 *            return new Some_Class();
985
+	 *        },
986
+	 * This is required for instantiating dependencies
987
+	 * where an interface has been type hinted in a class constructor. For example:
988
+	 *        'Required_Interface' => function () {
989
+	 *            return new A_Class_That_Implements_Required_Interface();
990
+	 *        },
991
+	 */
992
+	protected function _register_core_class_loaders()
993
+	{
994
+		$this->_class_loaders = array(
995
+			// load_core
996
+			'EE_Dependency_Map'                            => function () {
997
+				return $this;
998
+			},
999
+			'EE_Capabilities'                              => 'load_core',
1000
+			'EE_Encryption'                                => 'load_core',
1001
+			'EE_Front_Controller'                          => 'load_core',
1002
+			'EE_Module_Request_Router'                     => 'load_core',
1003
+			'EE_Registry'                                  => 'load_core',
1004
+			'EE_Request'                                   => function () {
1005
+				return $this->legacy_request;
1006
+			},
1007
+			'EventEspresso\core\services\request\Request'  => function () {
1008
+				return $this->request;
1009
+			},
1010
+			'EventEspresso\core\services\request\Response' => function () {
1011
+				return $this->response;
1012
+			},
1013
+			'EE_Base'                                      => 'load_core',
1014
+			'EE_Request_Handler'                           => 'load_core',
1015
+			'EE_Session'                                   => 'load_core',
1016
+			'EE_Cron_Tasks'                                => 'load_core',
1017
+			'EE_System'                                    => 'load_core',
1018
+			'EE_Maintenance_Mode'                          => 'load_core',
1019
+			'EE_Register_CPTs'                             => 'load_core',
1020
+			'EE_Admin'                                     => 'load_core',
1021
+			'EE_CPT_Strategy'                              => 'load_core',
1022
+			// load_class
1023
+			'EE_Registration_Processor'                    => 'load_class',
1024
+			// load_lib
1025
+			'EE_Message_Resource_Manager'                  => 'load_lib',
1026
+			'EE_Message_Type_Collection'                   => 'load_lib',
1027
+			'EE_Message_Type_Collection_Loader'            => 'load_lib',
1028
+			'EE_Messenger_Collection'                      => 'load_lib',
1029
+			'EE_Messenger_Collection_Loader'               => 'load_lib',
1030
+			'EE_Messages_Processor'                        => 'load_lib',
1031
+			'EE_Message_Repository'                        => 'load_lib',
1032
+			'EE_Messages_Queue'                            => 'load_lib',
1033
+			'EE_Messages_Data_Handler_Collection'          => 'load_lib',
1034
+			'EE_Message_Template_Group_Collection'         => 'load_lib',
1035
+			'EE_Payment_Method_Manager'                    => 'load_lib',
1036
+			'EE_DMS_Core_4_1_0'                            => 'load_dms',
1037
+			'EE_DMS_Core_4_2_0'                            => 'load_dms',
1038
+			'EE_DMS_Core_4_3_0'                            => 'load_dms',
1039
+			'EE_DMS_Core_4_5_0'                            => 'load_dms',
1040
+			'EE_DMS_Core_4_6_0'                            => 'load_dms',
1041
+			'EE_DMS_Core_4_7_0'                            => 'load_dms',
1042
+			'EE_DMS_Core_4_8_0'                            => 'load_dms',
1043
+			'EE_DMS_Core_4_9_0'                            => 'load_dms',
1044
+			'EE_DMS_Core_4_10_0'                            => 'load_dms',
1045
+			'EE_Messages_Generator'                        => static function () {
1046
+				return EE_Registry::instance()->load_lib(
1047
+					'Messages_Generator',
1048
+					array(),
1049
+					false,
1050
+					false
1051
+				);
1052
+			},
1053
+			'EE_Messages_Template_Defaults'                => static function ($arguments = array()) {
1054
+				return EE_Registry::instance()->load_lib(
1055
+					'Messages_Template_Defaults',
1056
+					$arguments,
1057
+					false,
1058
+					false
1059
+				);
1060
+			},
1061
+			// load_helper
1062
+			'EEH_Parse_Shortcodes'                         => static function () {
1063
+				if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
1064
+					return new EEH_Parse_Shortcodes();
1065
+				}
1066
+				return null;
1067
+			},
1068
+			'EE_Template_Config'                           => static function () {
1069
+				return EE_Config::instance()->template_settings;
1070
+			},
1071
+			'EE_Currency_Config'                           => static function () {
1072
+				return EE_Config::instance()->currency;
1073
+			},
1074
+			'EE_Registration_Config'                       => static function () {
1075
+				return EE_Config::instance()->registration;
1076
+			},
1077
+			'EE_Core_Config'                               => static function () {
1078
+				return EE_Config::instance()->core;
1079
+			},
1080
+			'EventEspresso\core\services\loaders\Loader'   => static function () {
1081
+				return LoaderFactory::getLoader();
1082
+			},
1083
+			'EE_Network_Config'                            => static function () {
1084
+				return EE_Network_Config::instance();
1085
+			},
1086
+			'EE_Config'                                    => static function () {
1087
+				return EE_Config::instance();
1088
+			},
1089
+			'EventEspresso\core\domain\Domain'             => static function () {
1090
+				return DomainFactory::getEventEspressoCoreDomain();
1091
+			},
1092
+			'EE_Admin_Config'                              => static function () {
1093
+				return EE_Config::instance()->admin;
1094
+			},
1095
+			'EE_Organization_Config'                       => static function () {
1096
+				return EE_Config::instance()->organization;
1097
+			},
1098
+			'EE_Network_Core_Config'                       => static function () {
1099
+				return EE_Network_Config::instance()->core;
1100
+			},
1101
+			'EE_Environment_Config'                        => static function () {
1102
+				return EE_Config::instance()->environment;
1103
+			},
1104
+			'EED_Core_Rest_Api'                            => static function () {
1105
+				return EED_Core_Rest_Api::instance();
1106
+			},
1107
+			'WP_REST_Server'                            => static function () {
1108
+				return rest_get_server();
1109
+			},
1110
+		);
1111
+	}
1112
+
1113
+
1114
+	/**
1115
+	 * can be used for supplying alternate names for classes,
1116
+	 * or for connecting interface names to instantiable classes
1117
+	 *
1118
+	 * @throws InvalidAliasException
1119
+	 */
1120
+	protected function _register_core_aliases()
1121
+	{
1122
+		$aliases = array(
1123
+			'CommandBusInterface'                                                          => 'EventEspresso\core\services\commands\CommandBusInterface',
1124
+			'EventEspresso\core\services\commands\CommandBusInterface'                     => 'EventEspresso\core\services\commands\CommandBus',
1125
+			'CommandHandlerManagerInterface'                                               => 'EventEspresso\core\services\commands\CommandHandlerManagerInterface',
1126
+			'EventEspresso\core\services\commands\CommandHandlerManagerInterface'          => 'EventEspresso\core\services\commands\CommandHandlerManager',
1127
+			'CapChecker'                                                                   => 'EventEspresso\core\services\commands\middleware\CapChecker',
1128
+			'AddActionHook'                                                                => 'EventEspresso\core\services\commands\middleware\AddActionHook',
1129
+			'CapabilitiesChecker'                                                          => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1130
+			'CapabilitiesCheckerInterface'                                                 => 'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface',
1131
+			'EventEspresso\core\domain\services\capabilities\CapabilitiesCheckerInterface' => 'EventEspresso\core\domain\services\capabilities\CapabilitiesChecker',
1132
+			'CreateRegistrationService'                                                    => 'EventEspresso\core\domain\services\registration\CreateRegistrationService',
1133
+			'CreateRegistrationCommandHandler'                                             => 'EventEspresso\core\services\commands\registration\CreateRegistrationCommand',
1134
+			'CopyRegistrationDetailsCommandHandler'                                        => 'EventEspresso\core\services\commands\registration\CopyRegistrationDetailsCommand',
1135
+			'CopyRegistrationPaymentsCommandHandler'                                       => 'EventEspresso\core\services\commands\registration\CopyRegistrationPaymentsCommand',
1136
+			'CancelRegistrationAndTicketLineItemCommandHandler'                            => 'EventEspresso\core\services\commands\registration\CancelRegistrationAndTicketLineItemCommandHandler',
1137
+			'UpdateRegistrationAndTransactionAfterChangeCommandHandler'                    => 'EventEspresso\core\services\commands\registration\UpdateRegistrationAndTransactionAfterChangeCommandHandler',
1138
+			'CreateTicketLineItemCommandHandler'                                           => 'EventEspresso\core\services\commands\ticket\CreateTicketLineItemCommand',
1139
+			'CreateTransactionCommandHandler'                                              => 'EventEspresso\core\services\commands\transaction\CreateTransactionCommandHandler',
1140
+			'CreateAttendeeCommandHandler'                                                 => 'EventEspresso\core\services\commands\attendee\CreateAttendeeCommandHandler',
1141
+			'TableManager'                                                                 => 'EventEspresso\core\services\database\TableManager',
1142
+			'TableAnalysis'                                                                => 'EventEspresso\core\services\database\TableAnalysis',
1143
+			'EspressoShortcode'                                                            => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1144
+			'ShortcodeInterface'                                                           => 'EventEspresso\core\services\shortcodes\ShortcodeInterface',
1145
+			'EventEspresso\core\services\shortcodes\ShortcodeInterface'                    => 'EventEspresso\core\services\shortcodes\EspressoShortcode',
1146
+			'EventEspresso\core\services\cache\CacheStorageInterface'                      => 'EventEspresso\core\services\cache\TransientCacheStorage',
1147
+			'LoaderInterface'                                                              => 'EventEspresso\core\services\loaders\LoaderInterface',
1148
+			'EventEspresso\core\services\loaders\LoaderInterface'                          => 'EventEspresso\core\services\loaders\Loader',
1149
+			'CommandFactoryInterface'                                                      => 'EventEspresso\core\services\commands\CommandFactoryInterface',
1150
+			'EventEspresso\core\services\commands\CommandFactoryInterface'                 => 'EventEspresso\core\services\commands\CommandFactory',
1151
+			'EmailValidatorInterface'                                                      => 'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface',
1152
+			'EventEspresso\core\domain\services\validation\email\EmailValidatorInterface'  => 'EventEspresso\core\domain\services\validation\email\EmailValidationService',
1153
+			'NoticeConverterInterface'                                                     => 'EventEspresso\core\services\notices\NoticeConverterInterface',
1154
+			'EventEspresso\core\services\notices\NoticeConverterInterface'                 => 'EventEspresso\core\services\notices\ConvertNoticesToEeErrors',
1155
+			'NoticesContainerInterface'                                                    => 'EventEspresso\core\services\notices\NoticesContainerInterface',
1156
+			'EventEspresso\core\services\notices\NoticesContainerInterface'                => 'EventEspresso\core\services\notices\NoticesContainer',
1157
+			'EventEspresso\core\services\request\RequestInterface'                         => 'EventEspresso\core\services\request\Request',
1158
+			'EventEspresso\core\services\request\ResponseInterface'                        => 'EventEspresso\core\services\request\Response',
1159
+			'EventEspresso\core\domain\DomainInterface'                                    => 'EventEspresso\core\domain\Domain',
1160
+			'Registration_Processor'                                                       => 'EE_Registration_Processor',
1161
+		);
1162
+		foreach ($aliases as $alias => $fqn) {
1163
+			if (is_array($fqn)) {
1164
+				foreach ($fqn as $class => $for_class) {
1165
+					$this->class_cache->addAlias($class, $alias, $for_class);
1166
+				}
1167
+				continue;
1168
+			}
1169
+			$this->class_cache->addAlias($fqn, $alias);
1170
+		}
1171
+		if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
1172
+			$this->class_cache->addAlias(
1173
+				'EventEspresso\core\services\notices\ConvertNoticesToAdminNotices',
1174
+				'EventEspresso\core\services\notices\NoticeConverterInterface'
1175
+			);
1176
+		}
1177
+	}
1178
+
1179
+
1180
+	/**
1181
+	 * This is used to reset the internal map and class_loaders to their original default state at the beginning of the
1182
+	 * request Primarily used by unit tests.
1183
+	 */
1184
+	public function reset()
1185
+	{
1186
+		$this->_register_core_class_loaders();
1187
+		$this->_register_core_dependencies();
1188
+	}
1189
+
1190
+
1191
+	/**
1192
+	 * PLZ NOTE: a better name for this method would be is_alias()
1193
+	 * because it returns TRUE if the provided fully qualified name IS an alias
1194
+	 * WHY?
1195
+	 * Because if a class is type hinting for a concretion,
1196
+	 * then why would we need to find another class to supply it?
1197
+	 * ie: if a class asks for `Fully/Qualified/Namespace/SpecificClassName`,
1198
+	 * then give it an instance of `Fully/Qualified/Namespace/SpecificClassName`.
1199
+	 * Don't go looking for some substitute.
1200
+	 * Whereas if a class is type hinting for an interface...
1201
+	 * then we need to find an actual class to use.
1202
+	 * So the interface IS the alias for some other FQN,
1203
+	 * and we need to find out if `Fully/Qualified/Namespace/SomeInterface`
1204
+	 * represents some other class.
1205
+	 *
1206
+	 * @deprecated 4.9.62.p
1207
+	 * @param string $fqn
1208
+	 * @param string $for_class
1209
+	 * @return bool
1210
+	 */
1211
+	public function has_alias($fqn = '', $for_class = '')
1212
+	{
1213
+		return $this->isAlias($fqn, $for_class);
1214
+	}
1215
+
1216
+
1217
+	/**
1218
+	 * PLZ NOTE: a better name for this method would be get_fqn_for_alias()
1219
+	 * because it returns a FQN for provided alias if one exists, otherwise returns the original $alias
1220
+	 * functions recursively, so that multiple aliases can be used to drill down to a FQN
1221
+	 *  for example:
1222
+	 *      if the following two entries were added to the _aliases array:
1223
+	 *          array(
1224
+	 *              'interface_alias'           => 'some\namespace\interface'
1225
+	 *              'some\namespace\interface'  => 'some\namespace\classname'
1226
+	 *          )
1227
+	 *      then one could use EE_Registry::instance()->create( 'interface_alias' )
1228
+	 *      to load an instance of 'some\namespace\classname'
1229
+	 *
1230
+	 * @deprecated 4.9.62.p
1231
+	 * @param string $alias
1232
+	 * @param string $for_class
1233
+	 * @return string
1234
+	 */
1235
+	public function get_alias($alias = '', $for_class = '')
1236
+	{
1237
+		return $this->getFqnForAlias($alias, $for_class);
1238
+	}
1239 1239
 }
Please login to merge, or discard this patch.