-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Adding RouteParser::getBasePath method #2852
Conversation
IMHO: For the sake of "symmetry", the method name |
@odan This is I was not sure about, as there also are methods like |
@piotr-cz Ah yes, that's right. |
@odan |
This is a BC change since we’re adding onto the interface. @akrabat correct? |
Yes. Ouch. |
What about keeping method in implementation without adding it to interface? |
Superseeded by #2859 |
See #2837
At this moment it's not trivial to retrieve
basePath
from code that doesn't have access to App or RouteCollector instances (and in my opinion code responsible for rendering responses shouldn't have).RouteParser class seems like good place for it as
relativeUrlFor
,urlFor
,fullUrlFor
)App::addRoutingMiddleware
I haven't implemented in this PR other methods that could be helpful like baseUrl by purpose as I'm not sure if it should be implemented in Slim or view classes.