ZF-8275: baseUrl view helper example error, base html tag works just with an absolute url

Description

baseUrl view helper example error, base html tag works just with an absolute url and the baseUrl helper cuts the domain part, here's the example: http://framework.zend.com/manual/en/… and the tag reference http://www.w3schools.com/TAGS/tag_base.asp

Comments

Can you please provide me with: * What is being produced by the baseUrl() view helper * What you actually want it to produce * Indicate how you would call it to achieve these results.

This is my url: http://192.168.2.3/MyProject/public so when I print the baseUrl return I got this: /MyProject/public so, the base tag needs the entire url (with the domain part http://192.168.2.3/MyProject/public) maybe you can add an extra argument to get the domain part too.

There are some difficulties with honoring this request. * Clearly the scheme needs to be returned as well, but what if the current page is under SSL, and the page you want to link to doesn't require SSL? * Should the port be included? This looks like up to three additional arguments, all of them optional, which would make for a cumbersome API.

My thought is that it would be best to have a separate helper for generating the scheme + host + port portion of the URL, and using it in conjunction to the baseUrl() view helper:


echo $this->hostName() . $this->baseUrl();

If you would like to see this feature, please create a proposal for it to ensure we capture all the requirements.

hum, you'r right too many arguments and it suck, I like the idea of a new helper maybe I'll sign the CLA ;), thanks.

What about the serverUrl view helper? This is exactly what it does.