Joomla! 1.5 API

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2011 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JFactory

Description

Joomla Framework Factory class

  • since: 1.5

Located in /joomla/factory.php (line 21)

Class JFactory
Method Summary
Method object JApplication &getApplication ([mixed $id = null], [array $config = array()], [ $prefix = 'J'])
Method object JCache &getCache ([string $group = ''], [string $handler = 'callback'], [string $storage = null])
Method object JRegistry &getConfig ([string $file = null], [string $type = 'PHP'])
Method object JDate &getDate ([mixed $time = 'now'], [int $tzOffset = 0])
Method object JEditor &getEditor ([string $editor = null])
Method object JSession &getSession ([array $options = array()])
Method object JURI &getURI ([ $uri = 'SERVER'])
Method object JUser &getUser ([int $id = null])
Method object Parsed &getXMLParser ([string $type = 'DOM'], [array: $options = array()])
Methods
getACL (line 222)

Get an authorization object

Returns a reference to the global JAuthorization object, only creating it if it doesn't already exist.

  • access: public
getApplication (line 34)

Get a application object

Returns a reference to the global JApplication object, only creating it if it doesn't already exist.

  • access: public
object JApplication &getApplication ([mixed $id = null], [array $config = array()], [ $prefix = 'J'])
  • mixed $id: A client identifier or name.
  • array $config: An optional associative array of configuration settings.
  • $prefix
getCache (line 188)

Get a cache object

Returns a reference to the global JCache object

  • access: public
object JCache &getCache ([string $group = ''], [string $handler = 'callback'], [string $storage = null])
  • string $group: The cache group name
  • string $handler: The handler to use
  • string $storage: The storage method
getConfig (line 63)

Get a configuration object

Returns a reference to the global JRegistry object, only creating it if it doesn't already exist.

  • access: public
object JRegistry &getConfig ([string $file = null], [string $type = 'PHP'])
  • string $file: The path to the configuration file
  • string $type: The type of the configuration file
getDate (line 416)

Return a reference to the JDate object

  • since: 1.5
  • access: public
object JDate &getDate ([mixed $time = 'now'], int $tzOffset)
  • mixed $time: The initial time for the JDate object
  • int $tzOffset: The timezone offset.
getDBO (line 261)

Get a database object

Returns a reference to the global JDatabase object, only creating it if it doesn't already exist.

object JDatabase &getDBO ()
getDocument (line 135)

Get a document object

Returns a reference to the global JDocument object, only creating it if it doesn't already exist.

  • access: public
object JDocument &getDocument ()
getEditor (line 376)

Get an editor object

  • access: public
object JEditor &getEditor ([string $editor = null])
  • string $editor: The editor to load, depends on the editor plugins that are installed
getLanguage (line 109)

Get a language object

Returns a reference to the global JLanguage object, only creating it if it doesn't already exist.

  • access: public
object JLanguage &getLanguage ()
getMailer (line 287)

Get a mailer object

Returns a reference to the global JMail object, only creating it if it doesn't already exist

  • access: public
object JMail &getMailer ()
getSession (line 89)

Get a session object

Returns a reference to the global JSession object, only creating it if it doesn't already exist.

  • access: public
object JSession &getSession ([array $options = array()])
  • array $options: An array containing session options
getTemplate (line 242)

Get a template object

Returns a reference to the global JTemplate object, only creating it if it doesn't already exist.

  • access: public
object JTemplate &getTemplate ()
getURI (line 399)

Return a reference to the JURI object

  • since: 1.5
  • access: public
object JURI &getURI ([ $uri = 'SERVER'])
  • $uri
getUser (line 157)

Get an user object

Returns a reference to the global JUser object, only creating it if it doesn't already exist.

  • access: public
object JUser &getUser ([int $id = null])
  • int $id: The user to load - Can be an integer or string - If string, it is converted to ID automatically.
getXMLParser (line 314)

Get an XML document

  • return: XML document object
  • access: public
object Parsed &getXMLParser ([string $type = 'DOM'], [array: $options = array()])
  • string $type: The type of xml parser needed 'DOM', 'RSS' or 'Simple'
  • array: $options: boolean ['lite'] When using 'DOM' if true or not defined then domit_lite is used string ['rssUrl'] the rss url to parse when using "RSS" string ['cache_time'] with 'RSS' - feed cache time. If not defined defaults to 3600 sec
Support Joomla!