JSession/getInstance
From Joomla! Documentation
< API16:JSession
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Returns the global Session object, only creating it if it doesn't already exist.
Syntax[edit]
static getInstance($handler, $options)
Parameter Name | Default Value | Description |
---|---|---|
$handler | ||
$options |
Returns[edit]
The Session object.
Defined in[edit]
libraries/joomla/session/session.php
Importing[edit]
jimport( 'joomla.session.session' );
Source Body[edit]
public static function getInstance($handler, $options)
{
static $instance;
if (!is_object($instance)) {
$instance = new JSession($handler, $options);
}
return $instance;
}
Examples[edit]
Code Examples[edit]