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
Pass di when register module autoloaders #156
Comments
an amazing feature that allow user to set a higher loading order for the current module when prepend the loading namespaces: |
It's easy to implement, how about |
@mruz it's fine! |
After a sound thought, pass the loader loading the current module to if people want to access the BTW, add |
@mruz please check my last comment. the follow code will not work as expect, as the loader of the module is not the same as the one in // better performance
public function registerAutoloaders(Di $di)
{
$di->loader->addNamespace(__NAMESPACE__ . '\Controllers', __DIR__ . '/controllers/');
} |
I didn't see your comment. |
Will get the loader from te di or create a new if not exist, so maybe that way. |
it'll be very convenient to access DI instance when
ModuleInterface::registerAutoloaders()
is changed toModuleInterface::registerAutoloaders(variable $di)
.VS
The text was updated successfully, but these errors were encountered: