Class JFactory

Description

Joomla Platform Factory class

  • abstract:
  • since: 11.1

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


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

Create a configuration object

  • see: JRegistry
  • since: 11.1
  • access: protected
static 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.
static method createDbo (line 694)

Create an database object

  • return: object
  • see: JDatabase
  • since: 11.1
  • access: protected
static JDatabase createDbo ()
static method createDocument (line 852)

Create a document object

  • return: object
  • see: JDocument
  • since: 11.1
  • access: protected
static JDocument createDocument ()
static method createLanguage (line 818)

Create a language object

  • return: object
  • see: JLanguage
  • since: 11.1
  • access: protected
static JLanguage createLanguage ()
static method createMailer (line 755)

Create a mailer object

  • return: object
  • see: JMail
  • since: 11.1
  • access: protected
static JMail createMailer ()
static method createSession (line 652)

Create a session object

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

Get an authorization object

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

  • return: object
  • access: public
static JACL getACL ()
static method getApplication (line 93)

Get a application object.

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

  • return: object
  • see: JApplication
  • since: 11.1
  • access: public
static JApplication getApplication ([mixed $id = null], [array $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
static method getCache (line 249)

Get a cache object

Returns the global JCache object

  • return: object
  • see: JCache
  • access: public
static 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
static method getConfig (line 121)

Get a configuration object

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

static JRegistry getConfig ([string $file = null], [string $type = 'PHP'])
  • string $file: The path to the configuration file
  • string $type: The type of the configuration file
static method getDate (line 522)

Return the JDate object

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

Get a database object.

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

  • return: object
  • see: JDatabase
  • since: 11.1
  • access: public
static JDatabase getDbo ()
static method getDocument (line 188)

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
static JDocument getDocument ()
static method getEditor (line 480)

Get an editor object.

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

Get a parsed XML Feed Source

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

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
static JLanguage getLanguage ()
static method getMailer (line 325)

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
static JMail getMailer ()
static method getSession (line 148)

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
static JSession getSession ([array $options = array()])
  • array $options: An array containing session options
static method getStream (line 880)

Creates a new stream object with appropriate prefix

  • see: JStream
  • since: 11.1
  • access: public
static 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)
static method getURI (line 504)

Return a reference to the JURI object

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

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
static 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.
static method getXML (line 434)

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
static 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.
static method getXMLParser (line 389)

Get an XML document

  • return: XML document object
  • see: JXMLElement
  • deprecated: 12.1 Use JXMLElement instead.
  • access: public
static object Parsed getXMLParser ([string $type = ''], [array $options = array()])
  • string $type: The type of XML parser needed 'DOM', 'RSS' or 'Simple'
  • array $options: ['rssUrl'] the rss url to parse when using "RSS", ['cache_time'] with ' RSS' - feed cache time. If not defined defaults to 3600 sec
static method _createConfig (line 578)

Create a configuration object

  • see: JRegistry
  • deprecated: 12.3
  • since: 11.1
  • access: protected
static 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.
static method _createDbo (line 679)

Create an database object

  • return: object
  • see: JDatabase
  • deprecated: 12.3
  • since: 11.1
  • access: protected
static JDatabase _createDbo ()
static method _createDocument (line 837)

Create a document object

  • return: object
  • see: JDocument
  • deprecated: 12.3
  • since: 11.1
  • access: protected
static JDocument _createDocument ()
static method _createLanguage (line 803)

Create a language object

  • return: object
  • see: JLanguage
  • deprecated: 12.3
  • since: 11.1
  • access: protected
static JLanguage _createLanguage ()
static method _createMailer (line 740)

Create a mailer object

  • return: object
  • see: JMail
  • deprecated: 12.3
  • since: 11.1
  • access: protected
static JMail _createMailer ()
static method _createSession (line 636)

Create a session object

  • return: object
  • deprecated: 12.3
  • since: 11.1
  • access: protected
static JSession _createSession ([array $options = array()])
  • array $options: An array containing session options

Documentation generated on Mon, 25 Jun 2012 13:54:34 -0500 by phpDocumentor 1.4.4