JFactory
From Joomla! Documentation
Examples
Access JFactory:
$var =& JFactory::content();
Access an open database via JFactory:
$database =& JFactory::getDBO();
Access a document using JFactory:
$document =& JFactory::getDocument();
Accessing URI's:
$uri =& JFactory::getURI();
The following provides access to the logged-in user info:
$user =& JFactory::getUser();