8000 UrlScript: added getAppPath() by JanTvrdik · Pull Request #45 · nette/http · GitHub
[go: up one dir, main page]

Skip to content

UrlScript: added 8000 getAppPath()#45

Closed
JanTvrdik wants to merge 1 commit intonette:masterfrom
JanTvrdik:url_app_path
Closed

UrlScript: added getAppPath()#45
JanTvrdik wants to merge 1 commit intonette:masterfrom
JanTvrdik:url_app_path

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 4 times, most recently from 8b74ce7 to 86c9227 Compare February 2, 2017 00:54
@dg dg force-pushed the master branch 2 times, most recently from 7f12fde to 9791354 Compare February 10, 2017 12:57
@dg dg force-pushed the master branch 2 times, most recently from 51f373c to 69af026 Compare June 13, 2017 09:59
@dg dg force-pushed the master branch 3 times, most recently from 87fefb5 to 9590f91 Compare July 21, 2017 19:42
@dg dg force-pushed the master branch 4 times, most recently from 56c2641 to 544d9e6 Compare March 14, 2018 18:37
@dg dg force-pushed the master branch 13 times, most recently from 5fdd093 to a8a99cb Compare August 30, 2018 23:26
@dg
Copy link
Member
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0