Skip to content
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

UrlScript: added getAppPath() #45

Closed
wants to merge 1 commit into from
Closed

Conversation

JanTvrdik
Copy link
Contributor

@JanTvrdik JanTvrdik commented Jan 18, 2015

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 dg commented Jan 18, 2015

How does it differ from getPathInfo()?

@JanTvrdik
Copy link
Contributor Author

@JanTvrdik JanTvrdik commented Jan 18, 2015

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

@dg
Copy link
Member

@dg 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

@JanTvrdik JanTvrdik commented Jan 18, 2015

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 Feb 9, 2015
@dg dg force-pushed the master branch 7 times, most recently from 1dc599c to f35d20f Compare Nov 5, 2015
@JanTvrdik
Copy link
Contributor Author

@JanTvrdik JanTvrdik commented Jan 26, 2016

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

@JanTvrdik
Copy link
Contributor Author

@JanTvrdik JanTvrdik commented May 1, 2016

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

@milo
Copy link
Member

@milo 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 issue May 1, 2016
@dg dg force-pushed the master branch 2 times, most recently from 7981e33 to 3fb64f5 Compare Jul 21, 2016
@dg dg force-pushed the master branch 3 times, most recently from b9f06ea to 4f6d6c9 Compare Dec 20, 2016
@dg dg force-pushed the master branch 11 times, most recently from caa05a6 to 708b922 Compare Sep 3, 2018
@dg dg force-pushed the master branch 4 times, most recently from d5b6f20 to 4b8dfd4 Compare Oct 25, 2018
@dg dg force-pushed the master branch 3 times, most recently from 980b18f to fe9a87f Compare Nov 23, 2018
@dg
Copy link
Member

@dg dg commented Feb 10, 2019

I will use relativePath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants