Closed
Conversation
Member
|
How does it differ from getPathInfo()? |
a21fafb to
d124dca
Compare
Contributor
Author
|
Added a test which explains the difference. See also nextras/static-router@5a137d9 |
Member
|
Hmm, what about name? |
Contributor
Author
|
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
Contributor
Author
|
This is still a very good idea. Suggestions for better method name are appreciated. |
Contributor
Author
|
I still need this and I still don't have a better name. |
Member
|
Something like variablePath? It is the part of url which is changing. |
JanTvrdik
added a commit
to nextras/mail-panel
that referenced
this pull request
May 1, 2016
7981e33 to
3fb64f5
Compare
b9f06ea to
4f6d6c9
Compare
8b74ce7 to
86c9227
Compare
7f12fde to
9791354
Compare
51f373c to
69af026
Compare
87fefb5 to
9590f91
Compare
56c2641 to
544d9e6
Compare
5fdd093 to
a8a99cb
Compare
Member
|
I will use relativePath. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?