Actions

API15

Difference between revisions of "JFactory Class"

From Joomla! Documentation

Line 1: Line 1:
== Examples ==
+
[[JFactory]]
Access [[JFactory]]:
+
    $var =& JFactory::content();
+
 
+
Access an open database via [[JFactory]]:
+
    $database =& JFactory::getDBO();
+
 
+
Access a document using [[JFactory]]:
+
    $document =& JFactory::getDocument();
+
 
+
    $uri =& JFactory::getURI();   
+
   
+
The following provides access to the logged-in user info.
+
    $user =& JFactory::getUser();
+
  
 
== See Also ==
 
== See Also ==
 
* [http://api.joomla.org/Joomla-Framework/JFactory.html [[JFactory]] class documentation from the Joomla! API]
 
* [http://api.joomla.org/Joomla-Framework/JFactory.html [[JFactory]] class documentation from the Joomla! API]
* [[Accessing_the_current_user_object]]
 
  
 
[[Category:Development]]
 
[[Category:Development]]

Revision as of 06:55, 4 September 2008

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

JFactory

See Also

  • JFactory class documentation from the Joomla! API