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
string
The path to the configuration file.- $type
string
The type of the configuration file.- $namespace
string
The 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
array
An array containing session options
Response
\JSession
object
createConfig
Create a configuration object
createConfig(string $file, string $type = 'PHP', string $namespace = '') : \JRegistry
see | \JRegistry |
---|---|
since |
11.1 |
Arguments
- $file
string
The path to the configuration file.- $type
string
The type of the configuration file.- $namespace
string
The 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
\JACL
object
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
mixed
A client identifier or name.- $config
array
An optional associative array of configuration settings.- $prefix
string
Application prefix
Response
\JApplication
object
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
string
The path to the configuration file- $type
string
The 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
\JDatabase
object
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
\JDocument
object
getEditor
Get an editor object.
getEditor(string $editor = null) : \JEditor
since |
11.1 |
---|
Arguments
- $editor
string
The editor to load, depends on the editor plugins that are installed
Response
\JEditor
object
getFeedParser
Get a parsed XML Feed Source
getFeedParser(string $url, integer $cache_time) : mixed
since |
11.1 |
---|
Arguments
- $url
string
Url for feed source.- $cache_time
integer
Time to cache feed for (using internal cache mechanism).
Response
mixed
SimplePie 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
\JLanguage
object
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
string
Full path and file name.- $isFile
boolean
true to load a file or false to load a string.
Response
mixed
JXMLElement 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
string
The 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
object
Parsed XML document object
Properties
config
since |
11.1 |
---|
Type(s)
\JConfig
dates
since |
11.3 |
---|
Type(s)
array