Abstract 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 JMail createMailer ()
 static JSession createSession ([array $options = array()])
 static JAccess getACL ()
 static JApplicationCms getApplication ([mixed $id = null], [array $config = array()], [string $prefix = 'J'])
 static JCacheController getCache ([string $group = ''], [string $handler = 'callback'], [string $storage = null])
 static JRegistry getConfig ([string $file = null], [string $type = 'PHP'], [string $namespace = ''])
 static JDate getDate ([mixed $time = 'now'], [mixed $tzOffset = null])
 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])
Variables
static JAccess $acl = null (line 82)

Global ACL object

  • deprecated: 13.3 (Platform) & 4.0 (CMS)
  • since: 11.1
  • access: public
static JApplicationCms $application = null (line 25)

Global application object

  • since: 11.1
  • access: public
static JCache $cache = null (line 33)

Global cache object

  • since: 11.1
  • access: public
static JConfig $config = null (line 41)

Global configuraiton object

  • since: 11.1
  • access: public
static JDatabaseDriver $database = null (line 90)

Global database object

  • since: 11.1
  • access: public
static array $dates = array() (line 49)

Container for JDate instances

  • since: 11.3
  • access: public
static JDocument $document = null (line 73)

Global document object

  • since: 11.1
  • access: public
static JLanguage $language = null (line 65)

Global language object

  • since: 11.1
  • access: public
static JMail $mailer = null (line 98)

Global mailer object

  • since: 11.1
  • access: public
static JSession $session = null (line 57)

Global session object

  • since: 11.1
  • access: public
Methods
static createConfig (line 548)

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 createDbo (line 613)

Create an database object

static JDatabaseDriver createDbo ()
static createDocument (line 719)

Create a document object

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

Create a language object

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

Create a mailer object

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

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 getACL (line 301)

Get an authorization object

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

  • return: object
  • deprecated: 13.3 (Platform) & 4.0 (CMS) - Use JAccess directly.
  • access: public
static JAccess getACL ()
static getApplication (line 115)

Get a application object.

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

  • return: object
  • see: JApplication
  • throws: Exception
  • since: 11.1
  • access: public
static JApplicationCms 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 getCache (line 266)

Get a cache object

Returns the global JCache object

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

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 $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 getDate (line 494)

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 getDbo (line 323)

Get a database object.

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

static JDatabaseDriver getDbo ()
static getDocument (line 211)

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 getEditor (line 446)

Get an editor object.

  • return: instance of JEditor
  • deprecated: 12.3 (Platform) & 4.0 (CMS) - Use JEditor directly
  • since: 11.1
  • throws: BadMethodCallException
  • access: public
static JEditor getEditor ([string $editor = null])
  • string $editor: The editor to load, depends on the editor plugins that are installed
static getFeedParser (line 367)

Get a parsed XML Feed Source

  • return: SimplePie parsed object on success, false on failure.
  • deprecated: 4.0 Use directly JFeedFactory or supply SimplePie instead. Mehod will be proxied to JFeedFactory beginning in 3.2
  • since: 11.1
  • throws: BadMethodCallException
  • 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 getLanguage (line 191)

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 getMailer (line 343)

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 getSession (line 171)

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 getStream (line 753)

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 getURI (line 476)

Return a reference to the JUri object

  • return: object
  • see: JUri
  • deprecated: 13.3 (Platform) & 4.0 (CMS) - Use JUri directly.
  • since: 11.1
  • access: public
static JUri getURI ([string $uri = 'SERVER'])
  • string $uri: Uri name.
static getUser (line 233)

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 getXML (line 392)

Reads a XML file.

  • return: JXMLElement or SimpleXMLElement on success or false on error.
  • see: JXMLElement
  • deprecated: 13.3 (Platform) & 4.0 (CMS) - Use SimpleXML directly.
  • 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.

Documentation generated on Tue, 19 Nov 2013 15:02:49 +0100 by phpDocumentor 1.4.3