JFactory/getURI
From Joomla! Documentation
< JFactory(Difference between revisions)
m |
m (Fixed bad link.) |
||
| Line 12: | Line 12: | ||
URI is http://www.example.com/joomla/index.php?task=view&id=12&Itemid=29 | URI is http://www.example.com/joomla/index.php?task=view&id=12&Itemid=29 | ||
===See also=== | ===See also=== | ||
| − | * [http://api.joomla.org/Joomla-Framework | + | * [http://api.joomla.org/Joomla-Framework/JFactory.html#getURI JFactory->getURI on api.joomla.org] |
* [[JURI]] | * [[JURI]] | ||
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JFactory]]</noinclude> | <noinclude>[[Category:Development]][[Category:Framework]][[Category:JFactory]]</noinclude> | ||
Latest revision as of 13:23, 1 June 2009
Static method which returns a reference to the global JURI object, only creating it if it doesn't already exist. The object returned will be of type JURI. The global URI object represents the URI that caused the current page to be rendered.
[edit] Syntax
object JURI getURI()
[edit] Example
In this example, the global URI object is output as a string.
$u =& JFactory::getURI(); echo 'URI is ' . $u->toString() . "\n";
might output
URI is http://www.example.com/joomla/index.php?task=view&id=12&Itemid=29