JFactory

From Joomla! Documentation
(Difference between revisions)
Jump to: navigation, search
(Undo revision 10518 by Rfriedel (Talk))
(Merged the text from 'What's available in the JFactory class')
Line 1: Line 1:
 +
== Examples ==
 +
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 07:57, 4 September 2008

Examples

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

Personal tools
Namespaces

Variants
Actions
Navigation
Joomla! Sites
Toolbox