-
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
!!!TASK: Bootstrap instantiates request handlers internally
It seems unnecessarily complex to have code register a request handler as build instance. Instead it is now registered by class name. The Flow Bootstrap will then create instances while determining the best matching request handler. To facilitate this being lazy the RequestHandlerInterface::getPriority method is now declared static so that we can decide beforehand if the priority is higher than any previously found best match. Depending on possibly request handlers and specifically in all preselected cases this all reduces the amount of created objects and possibly the amount of canHandle calls. A microptimization but which affects all requests. Primary concern was to make registration easier and internalize instantiation. As small simplification the `Bootstrap->setPreselectedRequestHandlerClassName` will also register the given class name as possible request handler removing one step. This is breaking if you have your own request handler implementation. The `getPrioritty` method needs to declare an `int` return type and must be static. Additionally the registration happens via `Bootstrap->registerRequestHandlerClassName(YourRequestHandler::class)`.
- Loading branch information
Showing
10 changed files
with
125 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.