-
Notifications
You must be signed in to change notification settings - Fork 5
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
Url generator #186
Url generator #186
Conversation
$ignoreIndexDir is used by the "ezroot" template operator. Certainly I've used "ezroot" a lot in templates, but I can't recall needing "ezroot" behavior in PHP. If that's ever needed, we could use a different function for it to match how that works in templates. Is buildPath a better function name? I was trying to think of that distinction between a "CMS path" (which ezurl() is, mostly) and a "file system" path (which ezroot() is) but can't come up with something clear. I have no strong objection to build on its own. +1 from me |
Maybe stick to The path is a little misleading in case you build full URLs. |
👍 |
It makes a difference if you run the unit tests on the lovestack machine or if travis runs it. The lovestack installation has a proper configuration with additional siteaccesses. #178 is fixing that situation. It introduces a new siteaccess "test" and sets the DefaultSiteaccess configuration to "test". |
…SerheyDolgushev (#182)
* Removing example siteaccesses * Making Unit tests happy - adding new siteaccess for unit tests * Changing the DefaultSiteaccess to force unittests to use it * Fixing unit tests with an explicit siteaccess for the tests
What we currently do in PHP to build a URL
That works fine, it's just a bit tough to use/learn. The 2nd parameter is $ignoreIndexDir which is don't fully understand anyways (never use it). The function name is more complex than it needs to be. The fact that it's called by reference makes it even harder.
This pull requests adds another function to the eZURI class which should be easier to use:
I added unit tests. It's very unlikely we introduced regression errors: it's a new function.