JFactory
Joomla Platform Factory class
| package |
Joomla.Platform |
|---|---|
| since |
11.1 |
Methods
_createConfig
Create a configuration object
_createConfig(string $file, string $type = 'PHP', string $namespace = '') : \JRegistry
| 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
_createDbo
Create an database object
_createDbo() : \JDatabase
_createDocument
Create a document object
_createDocument() : \JDocument
_createLanguage
Create a language object
_createLanguage() : \JLanguage
_createMailer
Create a mailer object
_createMailer() : \JMail
_createSession
Create a session object
_createSession(array $options = array()) : \JSession
| 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
| 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
createDbo
Create an database object
createDbo() : \JDatabase
createDocument
Create a document object
createDocument() : \JDocument
createLanguage
Create a language object
createLanguage() : \JLanguage
createMailer
Create a mailer object
createMailer() : \JMail
createSession
Create a session object
createSession(array $options = array()) : \JSession
getACL
Get an authorization object
getACL() : \JACL
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
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
getConfig
Get a configuration object
getConfig(string $file = null, string $type = 'PHP') : \JRegistry
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
getDate
Return the {@link JDate} object
getDate(mixed $time = 'now', mixed $tzOffset = null) : \JDate
getDbo
Get a database object.
getDbo() : \JDatabase
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
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
| 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
| 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
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
getSession
Get a session object.
getSession(array $options = array()) : \JSession
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
getURI
Return a reference to the {@link JURI} object
getURI(string $uri = 'SERVER') : \JURI
getUser
Get an user object.
getUser(integer $id = null) : \JUser
getXML
Reads a XML file.
getXML(string $data, boolean $isFile = true) : mixed
| 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
| 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
config
| since |
11.1 |
|---|
Type(s)
\JConfig
dates
| since |
11.3 |
|---|
Type(s)
array