Skip to content

Conversation

@JanTvrdik
Copy link
Contributor

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?

@dg
Copy link
Member

dg commented Jan 18, 2015

How does it differ from getPathInfo()?

@JanTvrdik
Copy link
Contributor Author

Added a test which explains the difference. See also nextras/static-router@5a137d9

@dg
Copy link
Member

dg commented Jan 18, 2015

Hmm, what about name? getAppPath() sound that it returns the exactly other part of path, or isn't it?

@JanTvrdik
Copy link
Contributor Author

Well I guess it is a but ambiguous. The idea is that router basically transforms appPath to appRequest.

@dg dg force-pushed the master branch 2 times, most recently from 6df6a37 to f17b437 Compare February 9, 2015 23:14
@dg dg force-pushed the master branch 7 times, most recently from 1dc599c to f35d20f Compare November 5, 2015 00:41
@JanTvrdik
Copy link
Contributor Author

This is still a very good idea. Suggestions for better method name are appreciated.

@JanTvrdik
Copy link
Contributor Author

I still need this and I still don't have a better name.

@milo
Copy link
Member

milo commented May 1, 2016

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 dg force-pushed the master branch 2 times, most recently from 7981e33 to 3fb64f5 Compare July 21, 2016 12:07
@dg dg force-pushed the master branch 3 times, most recently from b9f06ea to 4f6d6c9 Compare December 20, 2016 14:30
@dg dg force-pushed the master branch 11 times, most recently from caa05a6 to 708b922 Compare September 3, 2018 18:51
@dg dg force-pushed the master branch 4 times, most recently from d5b6f20 to 4b8dfd4 Compare October 25, 2018 18:26
@dg dg force-pushed the master branch 3 times, most recently from 980b18f to fe9a87f Compare November 23, 2018 16:03
@dg
Copy link
Member

dg commented Feb 10, 2019

I will use relativePath.

@dg dg closed this in 74e8114 Feb 10, 2019
dg pushed a commit that referenced this pull request Feb 11, 2019
dg pushed a commit that referenced this pull request Feb 11, 2019
dg pushed a commit that referenced this pull request Feb 11, 2019
dg pushed a commit that referenced this pull request Feb 11, 2019
dg pushed a commit that referenced this pull request Feb 11, 2019
dg pushed a commit that referenced this pull request Feb 13, 2019
dg pushed a commit that referenced this pull request Feb 13, 2019
dg pushed a commit that referenced this pull request Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants