API16

JSession/getInstance

< 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

Returns the global Session object, only creating it if it doesn't already exist.



Syntax

static getInstance($handler, $options)
Parameter Name Default Value Description
$handler
$options

Returns

The Session object. 

Defined in

libraries/joomla/session/session.php

Importing

jimport( 'joomla.session.session' );

Source Body

public static function getInstance($handler, $options)
{
        static $instance;

        if (!is_object($instance)) {
                $instance = new JSession($handler, $options);
        }

        return $instance;
}



Examples

Code Examples


Advertisement