⇦ Back to Authentication classMethod getInstance
public static \Joomla\CMS\Authentication\Authentication
getInstance
(string $pluginType = 'authentication')
Returns the global authentication object, only creating it
if it doesn't already exist.
Parameters
- string $pluginType The plugin type to run authorisation and authentication on
Returns
- \Joomla\CMS\Authentication\Authentication The global Authentication object
Since
Method getInstance - Source code
public static function getInstance(string $pluginType = 'authentication')
{
if (empty(self::$instance[$pluginType])) {
self::$instance[$pluginType] = new static($pluginType);
}
return self::$instance[$pluginType];
}