joomla/joomla-cms — pull request #4249 by bweston92 (2014-09-09 12:10:09+00:00)
Title: Allow JURI to be injected nice, but...

I'm not to sure about this as when DI is implemented all injected JUri instances would be a shared instance of the current request (Currently JFactory::getUri();). But for the time being doing new JUri isn't making it possible for my https site to load Google maps as the scheme on an empty JUri instance is null.

There is another way of doing this which would be modifying JUri setting the construct to accept 'SERVER' and then $this->populateFromServer();