Actions

API15

Difference between revisions of "JFactory Class"

From Joomla! Documentation

m (Wilsonge moved page JFactory Class to API15:JFactory Class: Move to API15 namespace as refers to a 1.5 version of the class)
(Remove red links)
 
Line 1: Line 1:
[[JFactory]]
+
[[API15:JFactory]]
  
 
''JFactory'' provides access to a group of core Joomla Objects. In each case it returns an object, usually with the current site settings.
 
''JFactory'' provides access to a group of core Joomla Objects. In each case it returns an object, usually with the current site settings.
Line 5: Line 5:
 
==getApplication()==
 
==getApplication()==
  
Returns a reference to the Global [[JApplication]] object
+
Returns a reference to the Global [[API15:JApplication]] object
 
<source lang='php'>$app =& JFactory::getApplication();</source>
 
<source lang='php'>$app =& JFactory::getApplication();</source>
  
 
==getCache()==
 
==getCache()==
  
Returns a reference to the Global [[JCache]] object
+
Returns a reference to the Global [[API15:JCache]] object
 
<source lang='php'>$cache =& JFactory::getCache();</source>
 
<source lang='php'>$cache =& JFactory::getCache();</source>
  
 
==getConfig()==
 
==getConfig()==
  
Returns a reference to the Global [[JConfig]] object
+
Returns a reference to the Global JConfig object
 
<source lang='php'>$config =& JFactory::getConfig();</source>
 
<source lang='php'>$config =& JFactory::getConfig();</source>
  
 
==getDate()==
 
==getDate()==
  
Returns a reference to the Global [[JDate]] object
+
Returns a reference to the Global [[API15:JDate]] object
 
<source lang='php'>$date =& JFactory::getDate();</source>
 
<source lang='php'>$date =& JFactory::getDate();</source>
  
 
==getDBO()==
 
==getDBO()==
  
Returns a reference to the Global [[JDatabase]] object
+
Returns a reference to the Global [[API15:JDatabase]] object
 
<source lang='php'>$db =& JFactory::getDBO();</source>
 
<source lang='php'>$db =& JFactory::getDBO();</source>
  
 
==getDocument()==
 
==getDocument()==
  
Returns a reference to the Global [[JDocument]] object
+
Returns a reference to the Global [[API15:JDocument]] object
 
<source lang='php'>$doc =& JFactory::getDocument();</source>
 
<source lang='php'>$doc =& JFactory::getDocument();</source>
  
 
==getEditor()==
 
==getEditor()==
  
Returns a reference to the Global [[JEDitor]] object
+
Returns a reference to the Global [[API15:JEditor]] object
 
<source lang='php'>$editor =& JFactory::getEditor();</source>
 
<source lang='php'>$editor =& JFactory::getEditor();</source>
  
 
==getLanguage()==
 
==getLanguage()==
  
Returns a reference to the Global [[JLanguage]] object
+
Returns a reference to the Global [[API15:JLanguage]] object
 
<source lang='php'>$lang =& JFactory::getLanguage();</source>
 
<source lang='php'>$lang =& JFactory::getLanguage();</source>
  
 
==getMailer()==
 
==getMailer()==
  
Returns a reference to the Global [[JMailer]] object
+
Returns a reference to the Global [[API15:JMail]] object
 
<source lang='php'>$mailer =& JFactory::getMailer();</source>
 
<source lang='php'>$mailer =& JFactory::getMailer();</source>
  
 
==getSession()==
 
==getSession()==
  
Returns a reference to the Global [[JSession]] object
+
Returns a reference to the Global [[API15:JSession]] object
 
<source lang='php'>$session =& JFactory::getSession();</source>
 
<source lang='php'>$session =& JFactory::getSession();</source>
  
 
==getTemplate()==
 
==getTemplate()==
  
Returns a reference to the Global [[JTemplate]] object
+
Returns a reference to the Global [[API15:JTemplate]] object
 
<source lang='php'>$template =& JFactory::getTemplate();</source>
 
<source lang='php'>$template =& JFactory::getTemplate();</source>
  
 
==getURI()==
 
==getURI()==
  
Returns a reference to the Global [[JURI]] object
+
Returns a reference to the Global [[API15:JURI]] object
 
<source lang='php'>$uri =& JFactory::getURI();</source>
 
<source lang='php'>$uri =& JFactory::getURI();</source>
  
 
==getUser()==
 
==getUser()==
  
Returns a reference to the Global [[JUser]] object
+
Returns a reference to the Global [[API15:JUser]] object
 
<source lang='php'>$user =& JFactory::getUser();</source>
 
<source lang='php'>$user =& JFactory::getUser();</source>
  
 
==getXMLParser()==
 
==getXMLParser()==
  
Returns a reference to the Global [[JXMLParser]] object
+
Returns a reference to the Global JXMLParser object
 
<source lang='php'>$xmlp =& JFactory::getXMLParser();</source>
 
<source lang='php'>$xmlp =& JFactory::getXMLParser();</source>
 
Takes parameters: $type & $options
 
Takes parameters: $type & $options

Latest revision as of 14:08, 4 July 2013

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.

API15:JFactory

JFactory provides access to a group of core Joomla Objects. In each case it returns an object, usually with the current site settings.

Contents

getApplication()

Returns a reference to the Global API15:JApplication object

$app =& JFactory::getApplication();

getCache()

Returns a reference to the Global API15:JCache object

$cache =& JFactory::getCache();

getConfig()

Returns a reference to the Global JConfig object

$config =& JFactory::getConfig();

getDate()

Returns a reference to the Global API15:JDate object

$date =& JFactory::getDate();

getDBO()

Returns a reference to the Global API15:JDatabase object

$db =& JFactory::getDBO();

getDocument()

Returns a reference to the Global API15:JDocument object

$doc =& JFactory::getDocument();

getEditor()

Returns a reference to the Global API15:JEditor object

$editor =& JFactory::getEditor();

getLanguage()

Returns a reference to the Global API15:JLanguage object

$lang =& JFactory::getLanguage();

getMailer()

Returns a reference to the Global API15:JMail object

$mailer =& JFactory::getMailer();

getSession()

Returns a reference to the Global API15:JSession object

$session =& JFactory::getSession();

getTemplate()

Returns a reference to the Global API15:JTemplate object

$template =& JFactory::getTemplate();

getURI()

Returns a reference to the Global API15:JURI object

$uri =& JFactory::getURI();

getUser()

Returns a reference to the Global API15:JUser object

$user =& JFactory::getUser();

getXMLParser()

Returns a reference to the Global JXMLParser object

$xmlp =& JFactory::getXMLParser();

Takes parameters: $type & $options $type can take the values 'DOM' (default), 'RSS', or 'Simple' $options takes an options array (default is empty) boolean ['lite'] for use with DOM to use domit_lite (default) string [#rssUrl'] for use with 'RSS' string [cache_time'] feed cache time for 'RSS' (default = 3600 seconds)

See Also