-
-
Notifications
You must be signed in to change notification settings - Fork 88
UrlScript: added getAppPath() #45
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
Conversation
|
How does it differ from getPathInfo()? |
a21fafb to
d124dca
Compare
|
Added a test which explains the difference. See also nextras/static-router@5a137d9 |
|
Hmm, what about name? |
|
Well I guess it is a but ambiguous. The idea is that router basically transforms appPath to appRequest. |
6df6a37 to
f17b437
Compare
1dc599c to
f35d20f
Compare
|
This is still a very good idea. Suggestions for better method name are appreciated. |
|
I still need this and I still don't have a better name. |
|
Something like variablePath? It is the part of url which is changing. |
7981e33 to
3fb64f5
Compare
b9f06ea to
4f6d6c9
Compare
caa05a6 to
708b922
Compare
d5b6f20 to
4b8dfd4
Compare
980b18f to
fe9a87f
Compare
|
I will use relativePath. |
When implementing custom router you usually need this method. The algorithm was taken from https://github.com/nextras/static-router/blob/d97be13214443e03cc5efb849adc69d9ae0a2a5d/src/StaticRouter.php#L49 and it should be equivalent what Route is doing (just micro-optimized). Although I think I made some assumption which I'm not sure if they are generally true. However the idea is important, the algorithm could be polished.
Thoughts?