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

Conversation

@JanTvrdik
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Jan 18, 2015

How does it differ from getPathInfo()?

@JanTvrdik JanTvrdik force-pushed the JanTvrdik:url_app_path branch from a21fafb to d124dca Jan 18, 2015

@JanTvrdik

This comment has been minimized.

Copy link
Contributor Author

commented Jan 18, 2015

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

@dg

This comment has been minimized.

Copy link
Member

commented Jan 18, 2015

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

@JanTvrdik

This comment has been minimized.

Copy link
Contributor Author

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 nette:master branch 2 times, most recently from 6df6a37 to f17b437 Feb 9, 2015

@dg dg force-pushed the nette:master branch from 78a872a to 360dadc Jun 19, 2015

@dg dg force-pushed the nette:master branch 7 times, most recently from 1dc599c to f35d20f Nov 4, 2015

@JanTvrdik

This comment has been minimized.

Copy link
Contributor Author

commented Jan 26, 2016

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

@dg dg force-pushed the nette:master branch from 805ff25 to dadd667 Feb 8, 2016

@dg dg force-pushed the nette:master branch from 51568f8 to 2381182 Apr 11, 2016

@dg dg force-pushed the nette:master branch from 19c6fa9 to 28af524 Apr 21, 2016

@JanTvrdik

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2016

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

@milo

This comment has been minimized.

Copy link
Member

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 nette:master branch from 6286f91 to d523f35 May 9, 2016

@dg dg force-pushed the nette:master branch from 67a7020 to 3fd485a Jun 17, 2016

@dg dg force-pushed the nette:master branch 2 times, most recently from 7981e33 to 3fb64f5 Jul 21, 2016

@dg dg force-pushed the nette:master branch 3 times, most recently from b9f06ea to 4f6d6c9 Dec 20, 2016

@dg dg force-pushed the nette:master branch 11 times, most recently from caa05a6 to 708b922 Aug 28, 2018

@dg dg force-pushed the nette:master branch from d13e833 to 230c505 Sep 13, 2018

@dg dg force-pushed the nette:master branch 4 times, most recently from d5b6f20 to 4b8dfd4 Oct 18, 2018

@dg dg force-pushed the nette:master branch from 4b8dfd4 to e394f34 Nov 5, 2018

@dg dg force-pushed the nette:master branch 3 times, most recently from 980b18f to fe9a87f Nov 20, 2018

@dg

This comment has been minimized.

Copy link
Member

commented Feb 10, 2019

I will use relativePath.

@dg dg closed this in 74e8114 Feb 10, 2019

dg added a commit that referenced this pull request Feb 11, 2019

dg added a commit that referenced this pull request Feb 11, 2019

dg added a commit that referenced this pull request Feb 11, 2019

dg added a commit that referenced this pull request Feb 11, 2019

dg added a commit that referenced this pull request Feb 11, 2019

dg added a commit that referenced this pull request Feb 13, 2019

dg added a commit that referenced this pull request Feb 13, 2019

dg added 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
Projects
None yet
4 participants
You can’t perform that action at this time.