CMSApplicationWhen Joomla does its initial routing in Joomla\CMS\Application\CMSApplication in the route method, the JUri object is cloned. The line is:

$uri = clone \JUri::getInstance();

Looking at the code for \JUri::getInstance(), when called without a parameter, it will contain the URI based on the SERVER variables.

Why is this cloned, rather than just assigned?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.