Back to Joomla project (class list)

Class Factory - list of methods

Joomla Platform Factory class.

Direct known subclasses

Package: Joomla\CMS
Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Factory.php
Project: Joomla

Method Summary

public static \Joomla\CMS\Application\CMSApplicationInterface
()

Get the global application object. When the global application doesn't exist, an exception is thrown.
Returns
  • \Joomla\CMS\Application\CMSApplicationInterface object
Since
  • 1.7.0
-
  • \Exception
Show source code of this method: getApplication Source Code

public static \Joomla\Registry\Registry
(mixed $file = null, mixed $type = 'PHP', mixed $namespace = '')

Get a configuration object
Parameters
  • string $file The path to the configuration file
  • string $type The type of the configuration file
  • string $namespace The namespace of the configuration file
Returns
  • \Joomla\Registry\Registry
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\Registry\Registry
Show source code of this method: getConfig Source Code

public static \Joomla\DI\Container
()

Get a container object
Returns
  • \Joomla\DI\Container
Since
  • 4.0.0
Show source code of this method: getContainer Source Code

public static \Joomla\CMS\Session\Session
(array $options = array())

Get a session object.
Parameters
  • array $options An array containing session options
Returns
  • \Joomla\CMS\Session\Session object
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\CMS\Session\Session
Show source code of this method: getSession Source Code

public static \Joomla\CMS\Language\Language
()

Get a language object.
Returns
  • \Joomla\CMS\Language\Language object
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\CMS\Language\Language
Show source code of this method: getLanguage Source Code

public static \Joomla\CMS\Document\Document
()

Get a document object.
Returns
  • \Joomla\CMS\Document\Document object
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\CMS\Document\Document
Show source code of this method: getDocument Source Code

public static \Joomla\CMS\User\User
(mixed $id = null)

Get a user object.
Parameters
  • int $id The user to load - Can be an integer or string - If string, it is converted to ID automatically.
Returns
  • \Joomla\CMS\User\User object
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\CMS\User\User
Show source code of this method: getUser Source Code

public static \Joomla\CMS\Cache\CacheController
(mixed $group = '', mixed $handler = 'callback', mixed $storage = null)

Get a cache object
Parameters
  • string $group The cache group name
  • string $handler The handler to use
  • string $storage The storage method
Returns
  • \Joomla\CMS\Cache\CacheController object
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\CMS\Cache\Cache
Show source code of this method: getCache Source Code

public static \Joomla\Database\DatabaseDriver
()

Get a database object.
Returns
  • \Joomla\Database\DatabaseDriver
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\Database\DatabaseDriver
Show source code of this method: getDbo Source Code

public static \Joomla\CMS\Mail\Mail
()

Get a mailer object.
Returns
  • \Joomla\CMS\Mail\Mail object
Since
  • 1.7.0
-
  • \Joomla\CMS\Mail\Mail
Show source code of this method: getMailer Source Code

public static \Joomla\CMS\Date\Date
(mixed $time = 'now', mixed $tzOffset = null)

Return the {@link Date} object
Parameters
  • mixed $time The initial time for the Date object
  • mixed $tzOffset The timezone offset.
Returns
  • \Joomla\CMS\Date\Date object
Since
  • 1.7.0
-
  • \Joomla\CMS\Date\Date
Show source code of this method: getDate Source Code

protected static \Joomla\Registry\Registry
(mixed $file, mixed $type = 'PHP', mixed $namespace = '')

Create a configuration object
Parameters
  • string $file The path to the configuration file.
  • string $type The type of the configuration file.
  • string $namespace The namespace of the configuration file.
Returns
  • \Joomla\Registry\Registry
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\Registry\Registry
Show source code of this method: createConfig Source Code

protected static \Joomla\DI\Container
()

Create a container object
Returns
  • \Joomla\DI\Container
Since
  • 4.0.0
Show source code of this method: createContainer Source Code

protected static \Joomla\Database\DatabaseDriver
()

Create a database object
Returns
  • \Joomla\Database\DatabaseDriver
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\Database\DatabaseDriver
Show source code of this method: createDbo Source Code

protected static \Joomla\CMS\Mail\Mail
()

Create a mailer object
Returns
  • \Joomla\CMS\Mail\Mail object
Since
  • 1.7.0
-
  • \Joomla\CMS\Mail\Mail
Show source code of this method: createMailer Source Code

protected static \Joomla\CMS\Language\Language
()

Create a language object
Returns
  • \Joomla\CMS\Language\Language object
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\CMS\Language\Language
Show source code of this method: createLanguage Source Code

protected static \Joomla\CMS\Document\Document
()

Create a document object
Returns
  • \Joomla\CMS\Document\Document object
Since
  • 1.7.0
Deprecated
  • 5.0
-
  • \Joomla\CMS\Document\Document
Show source code of this method: createDocument Source Code

public static \Joomla\CMS\Filesystem\Stream
(mixed $usePrefix = true, mixed $useNetwork = true, mixed $userAgentSuffix = 'Joomla', mixed $maskUserAgent = false)

Creates a new stream object with appropriate prefix
Parameters
  • bool $usePrefix Prefix the connections for writing
  • bool $useNetwork Use network if available for writing; use false to disable (e.g. FTP, SCP)
  • string $userAgentSuffix String to append to user agent
  • bool $maskUserAgent User agent masking (prefix Mozilla)
Returns
  • \Joomla\CMS\Filesystem\Stream
Since
  • 1.7.0
-
  • \Joomla\CMS\Filesystem\Stream
Show source code of this method: getStream Source Code

Properties Summary

public static \Joomla\CMS\Application\CMSApplicationInterface
$application
Global application object
Since
  • 1.7.0
public static \Joomla\CMS\Cache\Cache
$cache
Global cache object
Since
  • 1.7.0
public static \JConfig
$config
Global configuration object
Since
  • 1.7.0
-
  • \JConfig
public static \Joomla\DI\Container
$container
Global container object
Since
  • 4.0.0
public static array
$dates
Container for Date instances
Since
  • 1.7.3
public static \Joomla\CMS\Session\Session
$session
Global session object
Since
  • 1.7.0
-
  • \Joomla\CMS\Session\Session
public static \Joomla\CMS\Language\Language
$language
Global language object
Since
  • 1.7.0
-
  • \Joomla\CMS\Language\Language
public static \Joomla\CMS\Document\Document
$document
Global document object
Since
  • 1.7.0
-
  • \Joomla\CMS\Document\Document
public static \Joomla\Database\DatabaseDriver
$database
Global database object
Since
  • 1.7.0
-
  • \Joomla\Database\DatabaseDriver
public static \Joomla\CMS\Mail\Mail
$mailer
Global mailer object
Since
  • 1.7.0

Tags Summary

Since
1.7.0