-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
UrlImmutable should implement static get() method #201
Comments
If you know it's wrong, why are you sending PR? |
Because there is no simple native way to get the actual request URL. |
|
@mabar This notation is too complicated for beginners. You have to somehow get the request through the DIC, from which you only get the URL. If I want to figure out how to get the URL, I would expect to "somehow" create an instance of the URL and simply read the data. |
The fact that there is no simple way to get the current URL is no reason to implement it badly. Btw I think that this way is pretty simple: |
Class
UrlImmutable
should implement basic static method for get current URL.Sample implementation:
I know Singleton can be evil sometimes (https://phpfashion.com/singleton-sofie-s). On the other hand, having the ability to quickly access the actual URL is completely missing from the framework and has to be worked around in various ways.
Thanks.
The text was updated successfully, but these errors were encountered: