You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the RegistrationHub is an object that wraps the class loader, with two responsibilities:
Originally: To provide methods to register PSR-0 namespaces, etc.
The architectural goal is to separate convenience registration adapter logic from the class lookup logic.
Later, a method buildSearchableNamespaces() was added, to start class discovery.
A general goal is to heavily rely on composition internally, to nicely separate concerns, but to provide convenient facade objects for the library user, hiding most of the composition details.
During integration with Drupal, I realized that it will be useful for a library user to have one central object for "everything you may want to do with the class loader after bootstrap".
Typically this is not the loadClass() or register() methods. This stuff is dealt with at bootstrap, and then silently does its job.
What is relevant is namespace registration and discovery stuff. So the buildSearchableNamespaces() ended up in the class.
What we could do:
// Registration stuffinterfaceRegistrationHub_Interface
class RegistrationHubimplementsRegistrationHub_Interface// Discovery stuffinterfaceRegistrationIntrospectionHub_InterfaceextendsRegistrationHub_Interface
class RegistrationInspectionHubimplementsRegistrationIntrospectionHub_Interface
The text was updated successfully, but these errors were encountered:
Currently the RegistrationHub is an object that wraps the class loader, with two responsibilities:
The architectural goal is to separate convenience registration adapter logic from the class lookup logic.
A general goal is to heavily rely on composition internally, to nicely separate concerns, but to provide convenient facade objects for the library user, hiding most of the composition details.
During integration with Drupal, I realized that it will be useful for a library user to have one central object for "everything you may want to do with the class loader after bootstrap".
Typically this is not the loadClass() or register() methods. This stuff is dealt with at bootstrap, and then silently does its job.
What is relevant is namespace registration and discovery stuff. So the buildSearchableNamespaces() ended up in the class.
What we could do:
The text was updated successfully, but these errors were encountered: