Joomla! Platform 12.1

Abstract Class JFactory

Description

Joomla Platform Factory class

  • abstract:
  • since: 11.1

Located in /libraries/joomla/factory.php (line 17)

Abstract class JFactory
Variable Summary
Static variable static JAccess $acl
Static variable static JApplication $application
Static variable static JCache $cache
Static variable static JConfig $config
Static variable static array $dates
Static variable static JMail $mailer
Method Summary
Static method static JRegistry createConfig (string $file, [string $type = 'PHP'], [string $namespace = ''])
Static method static JMail createMailer ()
Static method static JSession createSession ([ $options = array()])
Static method static JAccess getACL ()
Static method static JApplication getApplication ([mixed $id = null], [ $config = array()], [string $prefix = 'J'])
Static method static JCacheController getCache ([string $group = ''], [string $handler = 'callback'], [string $storage = null])
Static method static JRegistry getConfig ([string $file = null], [string $type = 'PHP'])
Static method static JDate getDate ([mixed $time = 'now'], [mixed $tzOffset = null])
Static method static JEditor getEditor ([string $editor = null])
Static method static mixed getFeedParser (string $url, [integer $cache_time = 0])
Static method static JMail getMailer ()
Static method static JSession getSession ([ $options = array()])
Static method static JStream getStream ([boolean $use_prefix = true], [boolean $use_network = true], [string $ua = null], [boolean $uamask = false])
Static method static JURI getURI ([string $uri = 'SERVER'])
Static method static JUser getUser ([integer $id = null])
Static method static mixed getXML (string $data, [boolean $isFile = true])
Variables
JAccess $acl = null (line 65)
  • since: 11.1
  • access: public
JApplication $application = null (line 23)
  • since: 11.1
  • access: public
JCache $cache = null (line 29)
  • since: 11.1
  • access: public
JConfig $config = null (line 35)
  • since: 11.1
  • access: public
JDatabaseDriver $database = null (line 71)
  • since: 11.1
  • access: public
array $dates = array() (line 41)
  • since: 11.3
  • access: public
JDocument $document = null (line 59)
  • since: 11.1
  • access: public
JLanguage $language = null (line 53)
  • since: 11.1
  • access: public
JMail $mailer = null (line 77)
  • since: 11.1
  • access: public
JSession $session = null (line 47)
  • since: 11.1
  • access: public
Methods
createConfig (line 525)

Create a configuration object

  • see: JRegistry
  • since: 11.1
  • access: protected
JRegistry createConfig (string $file, [string $type = 'PHP'], [string $namespace = ''])
  • string $file: The path to the configuration file.
  • string $type: The type of the configuration file.
  • string $namespace: The namespace of the configuration file.
createDbo (line 589)

Create an database object

JDatabaseDriver createDbo ()
createDocument (line 697)

Create a document object

  • return: object
  • see: JDocument
  • since: 11.1
  • access: protected
JDocument createDocument ()
createLanguage (line 679)

Create a language object

  • return: object
  • see: JLanguage
  • since: 11.1
  • access: protected
JLanguage createLanguage ()
createMailer (line 632)

Create a mailer object

  • return: object
  • see: JMail
  • since: 11.1
  • access: protected
JMail createMailer ()
createSession (line 563)

Create a session object

  • return: object
  • since: 11.1
  • access: protected
JSession createSession ([ $options = array()])
  • array $options: An array containing session options
getACL (line 274)

Get an authorization object

Returns the global JAccess object, only creating it if it doesn't already exist.

  • return: object
  • access: public
JAccess getACL ()
getApplication (line 94)

Get a application object.

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

  • return: object
  • see: JApplication
  • throws: Exception
  • since: 11.1
  • access: public
JApplication getApplication ([mixed $id = null], [ $config = array()], [string $prefix = 'J'])
  • mixed $id: A client identifier or name.
  • array $config: An optional associative array of configuration settings.
  • string $prefix: Application prefix
getCache (line 243)

Get a cache object

Returns the global JCache object

  • return: object
  • see: JCache
  • access: public
JCacheController 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 122)

Get a configuration object

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

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 471)

Return the JDate object

  • return: object
  • see: JDate
  • since: 11.1
  • access: public
JDate getDate ([mixed $time = 'now'], [mixed $tzOffset = null])
  • mixed $time: The initial time for the JDate object
  • mixed $tzOffset: The timezone offset.
getDbo (line 294)

Get a database object.

Returns the global JDatabaseDriver object, only creating it if it doesn't already exist.

JDatabaseDriver getDbo ()
getDocument (line 189)

Get a document object.

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

  • return: object
  • see: JDocument
  • since: 11.1
  • access: public
JDocument getDocument ()
getEditor (line 429)

Get an editor object.

  • return: object
  • since: 11.1
  • access: public
JEditor getEditor ([string $editor = null])
  • string $editor: The editor to load, depends on the editor plugins that are installed
getFeedParser (line 340)

Get a parsed XML Feed Source

  • return: SimplePie parsed object on success, false on failure.
  • since: 11.1
  • access: public
mixed getFeedParser (string $url, integer $cache_time)
  • string $url: Url for feed source.
  • integer $cache_time: Time to cache feed for (using internal cache mechanism).
getLanguage (line 169)

Get a language object.

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

  • return: object
  • see: JLanguage
  • since: 11.1
  • access: public
JLanguage getLanguage ()
getMailer (line 319)

Get a mailer object.

Returns the global JMail object, only creating it if it doesn't already exist.

  • return: object
  • see: JMail
  • since: 11.1
  • access: public
JMail getMailer ()
getSession (line 149)

Get a session object.

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

  • return: object
  • see: JSession
  • since: 11.1
  • access: public
JSession getSession ([ $options = array()])
  • array $options: An array containing session options
getStream (line 720)

Creates a new stream object with appropriate prefix

  • see: JStream
  • since: 11.1
  • access: public
JStream getStream ([boolean $use_prefix = true], [boolean $use_network = true], [string $ua = null], [boolean $uamask = false])
  • boolean $use_prefix: Prefix the connections for writing
  • boolean $use_network: Use network if available for writing; use false to disable (e.g. FTP, SCP)
  • string $ua: UA User agent to use
  • boolean $uamask: User agent masking (prefix Mozilla)
getURI (line 453)

Return a reference to the JURI object

  • return: object
  • see: JURI
  • since: 11.1
  • access: public
JURI getURI ([string $uri = 'SERVER'])
  • string $uri: Uri name.
getUser (line 211)

Get an user object.

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

  • return: object
  • see: JUser
  • since: 11.1
  • access: public
JUser getUser ([integer $id = null])
  • integer $id: The user to load - Can be an integer or string - If string, it is converted to ID automatically.
getXML (line 384)

Reads a XML file.

  • return: JXMLElement on success or false on error.
  • see: JXMLElement
  • todo: This may go in a separate class - error reporting may be improved.
  • since: 11.1
  • access: public
mixed getXML (string $data, [boolean $isFile = true])
  • string $data: Full path and file name.
  • boolean $isFile: true to load a file or false to load a string.
/html>