JFactory

Joomla Platform Factory class

abstract
package

Joomla.Platform

since

11.1

Methods

_createConfig

Create a configuration object

_createConfig(string $file, string $type = 'PHP', string $namespace = '') : \JRegistry
static deprecated
see \JRegistry
since

11.1

deprecated

12.3

Arguments

$file

stringThe path to the configuration file.

$type

stringThe type of the configuration file.

$namespace

stringThe namespace of the configuration file.

Response

\JRegistry

_createDbo

Create an database object

_createDbo() : \JDatabase
static deprecated
see \JDatabase
since

11.1

deprecated

12.3

Response

\JDatabaseobject

_createDocument

Create a document object

_createDocument() : \JDocument
static deprecated
see \JDocument
since

11.1

deprecated

12.3

Response

\JDocumentobject

_createLanguage

Create a language object

_createLanguage() : \JLanguage
static deprecated
see \JLanguage
since

11.1

deprecated

12.3

Response

\JLanguageobject

_createMailer

Create a mailer object

_createMailer() : \JMail
static deprecated
see \JMail
since

11.1

deprecated

12.3

Response

\JMailobject

_createSession

Create a session object

_createSession(array $options = array()) : \JSession
static deprecated
since

11.1

deprecated

12.3

Arguments

$options

arrayAn array containing session options

Response

\JSessionobject

createConfig

Create a configuration object

createConfig(string $file, string $type = 'PHP', string $namespace = '') : \JRegistry
static
see \JRegistry
since

11.1

Arguments

$file

stringThe path to the configuration file.

$type

stringThe type of the configuration file.

$namespace

stringThe namespace of the configuration file.

Response

\JRegistry

createDbo

Create an database object

createDbo() : \JDatabase
static
see \JDatabase
since

11.1

Response

\JDatabaseobject

createDocument

Create a document object

createDocument() : \JDocument
static
see \JDocument
since

11.1

Response

\JDocumentobject

createLanguage

Create a language object

createLanguage() : \JLanguage
static
see \JLanguage
since

11.1

Response

\JLanguageobject

createMailer

Create a mailer object

createMailer() : \JMail
static
see \JMail
since

11.1

Response

\JMailobject

createSession

Create a session object

createSession(array $options = array()) : \JSession
static
since

11.1

Arguments

$options

arrayAn array containing session options

Response

\JSessionobject

getACL

Get an authorization object

getACL() : \JACL
static

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

Response

\JACLobject

getApplication

Get a application object.

getApplication(mixed $id = null, array $config = array(), string $prefix = 'J') : \JApplication
static

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

see \JApplication
since

11.1

Arguments

$id

mixedA client identifier or name.

$config

arrayAn optional associative array of configuration settings.

$prefix

stringApplication prefix

Response

\JApplicationobject

getCache

Get a cache object

getCache(string $group = '', string $handler = 'callback', string $storage = null) : \JCache
static

Returns the global JCache object

see \JCache

Arguments

$group

stringThe cache group name

$handler

stringThe handler to use

$storage

stringThe storage method

Response

\JCacheobject

getConfig

Get a configuration object

getConfig(string $file = null, string $type = 'PHP') : \JRegistry
static

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

see \JRegistry
since

11.1

Arguments

$file

stringThe path to the configuration file

$type

stringThe type of the configuration file

Response

\JRegistry

getDate

Return the {@link JDate} object

getDate(mixed $time = 'now', mixed $tzOffset = null) : \JDate
static
see \JDate
since

11.1

Arguments

$time

mixedThe initial time for the JDate object

$tzOffset

mixedThe timezone offset.

Response

\JDateobject

getDbo

Get a database object.

getDbo() : \JDatabase
static

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

see \JDatabase
since

11.1

Response

\JDatabaseobject

getDocument

Get a document object.

getDocument() : \JDocument
static

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

see \JDocument
since

11.1

Response

\JDocumentobject

getEditor

Get an editor object.

getEditor(string $editor = null) : \JEditor
static
since

11.1

Arguments

$editor

stringThe editor to load, depends on the editor plugins that are installed

Response

\JEditorobject

getFeedParser

Get a parsed XML Feed Source

getFeedParser(string $url, integer $cache_time) : mixed
static
since

11.1

Arguments

$url

stringUrl for feed source.

$cache_time

integerTime to cache feed for (using internal cache mechanism).

Response

mixedSimplePie parsed object on success, false on failure.

getLanguage

Get a language object.

getLanguage() : \JLanguage
static

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

see \JLanguage
since

11.1

Response

\JLanguageobject

getMailer

Get a mailer object.

getMailer() : \JMail
static

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

see \JMail
since

11.1

Response

\JMailobject

getSession

Get a session object.

getSession(array $options = array()) : \JSession
static

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

see \JSession
since

11.1

Arguments

$options

arrayAn array containing session options

Response

\JSessionobject

getStream

Creates a new stream object with appropriate prefix

getStream(boolean $use_prefix = true, boolean $use_network = true, string $ua = null, boolean $uamask = false) : \JStream
static
see \JStream
since

11.1

Arguments

$use_prefix

booleanPrefix the connections for writing

$use_network

booleanUse network if available for writing; use false to disable (e.g. FTP, SCP)

$ua

stringUA User agent to use

$uamask

booleanUser agent masking (prefix Mozilla)

Response

\JStream

getURI

Return a reference to the {@link JURI} object

getURI(string $uri = 'SERVER') : \JURI
static
see \JURI
since

11.1

Arguments

$uri

stringUri name.

Response

\JURIobject

getUser

Get an user object.

getUser(integer $id = null) : \JUser
static

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

see \JUser
since

11.1

Arguments

$id

integerThe user to load - Can be an integer or string - If string, it is converted to ID automatically.

Response

\JUserobject

getXML

Reads a XML file.

getXML(string $data, boolean $isFile = true) : mixed
static
see \JXMLElement
since

11.1

todo

This may go in a separate class - error reporting may be improved.

Arguments

$data

stringFull path and file name.

$isFile

booleantrue to load a file or false to load a string.

Response

mixedJXMLElement on success or false on error.

getXMLParser

Get an XML document

getXMLParser(string $type = '', array $options = array()) : object
static deprecated
deprecated

12.1 Use JXMLElement instead.

see \JXMLElement

Arguments

$type

stringThe type of XML parser needed 'DOM', 'RSS' or 'Simple'

$options

array['rssUrl'] the rss url to parse when using "RSS", ['cache_time'] with ' RSS' - feed cache time. If not defined defaults to 3600 sec

Response

objectParsed XML document object

Properties

application

static
since

11.1

Type(s)

\JApplication

cache

static
since

11.1

Type(s)

\JCache

config

static
since

11.1

Type(s)

\JConfig

dates

static
since

11.3

Type(s)

array

session

static
since

11.1

Type(s)

\JSession

language

static
since

11.1

Type(s)

\JLanguage

document

static
since

11.1

Type(s)

\JDocument

acl

static
since

11.1

Type(s)

\JAccess

database

static
since

11.1

Type(s)

\JDatabase

mailer

static
since

11.1

Type(s)

\JMail