UrlScript: added getAppPath() - #45
Closed
JanTvrdik wants to merge 1 commit into
Closed
Conversation
Member
|
How does it differ from getPathInfo()? |
JanTvrdik
force-pushed
the
url_app_path
branch
from
January 18, 2015 15:15
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. |
dg
force-pushed
the
master
branch
2 times, most recently
from
February 9, 2015 23:14
6df6a37 to
f17b437
Compare
dg
force-pushed
the
master
branch
7 times, most recently
from
November 5, 2015 00:41
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
dg
force-pushed
the
master
branch
2 times, most recently
from
July 21, 2016 12:07
7981e33 to
3fb64f5
Compare
dg
force-pushed
the
master
branch
3 times, most recently
from
December 20, 2016 14:30
b9f06ea to
4f6d6c9
Compare
dg
force-pushed
the
master
branch
4 times, most recently
from
February 2, 2017 00:54
8b74ce7 to
86c9227
Compare
dg
force-pushed
the
master
branch
2 times, most recently
from
February 10, 2017 12:57
7f12fde to
9791354
Compare
dg
force-pushed
the
master
branch
2 times, most recently
from
June 13, 2017 09:59
51f373c to
69af026
Compare
dg
force-pushed
the
master
branch
3 times, most recently
from
July 21, 2017 19:42
87fefb5 to
9590f91
Compare
dg
force-pushed
the
master
branch
4 times, most recently
from
March 14, 2018 18:37
56c2641 to
544d9e6
Compare
dg
force-pushed
the
master
branch
13 times, most recently
from
August 30, 2018 23:26
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?