-
-
Notifications
You must be signed in to change notification settings - Fork 462
feat(scope): add getGlobalEventProcessors method #1990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -359,6 +359,14 @@ | |
| self::$globalEventProcessors[] = $eventProcessor; | ||
| } | ||
|
|
||
| /** | ||
| * Get the global event processors {@see Scope::applyToEvent}. | ||
| */ | ||
| public static function getGlobalEventProcessors(): array | ||
| { | ||
| return self::$globalEventProcessors; | ||
| } | ||
|
|
||
| /** | ||
|
Comment on lines
362
to
372
|
||
| * Clears the scope and resets any data it contains. | ||
| * | ||
|
|
@@ -464,7 +472,7 @@ | |
| $hint = new EventHint(); | ||
| } | ||
|
|
||
| foreach (array_merge(self::$globalEventProcessors, $this->eventProcessors) as $processor) { | ||
| foreach (array_merge(self::getGlobalEventProcessors(), $this->eventProcessors) as $processor) { | ||
| $event = $processor($event, $hint); | ||
|
|
||
| if ($event === null) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.