Back to Updater class

Method getInstance

public static \Joomla\CMS\Updater\Updater
getInstance
()
Returns a reference to the global Installer object, only creating it if it doesn't already exist.
Returns
  • \Joomla\CMS\Updater\Updater An installer object
Since
  • 1.7.0
Class: Updater
Project: Joomla

Method getInstance - Source code

/**
 * Returns a reference to the global Installer object, only creating it
 * if it doesn't already exist.
 *
 * @return  Updater  An installer object
 *
 * @since   1.7.0
 */
public static function getInstance()
{
    if (!isset(self::$instance)) {
        self::$instance = new static();
    }
    return self::$instance;
}