Back to Session class

Method getInstance

public static static
getInstance
()
Returns the global session object.
Returns
  • static The Session object.
Since
  • 1.5
Deprecated
  • 5.0
Class: Session
Project: Joomla

Method getInstance - Source code

/**
 * Returns the global session object.
 *
 * @return  static  The Session object.
 *
 * @since   1.5
 * @deprecated  5.0  Load the session service from the dependency injection container or via $app->getSession()
 */
public static function getInstance()
{
    @trigger_error(__METHOD__ . '() is deprecated. Load the session from the dependency injection container or via Factory::getApplication()->getSession().', E_USER_DEPRECATED);
    return Factory::getApplication()->getSession();
}