Actions

API16

JSession/ construct

< 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

Constructor



Syntax

__construct($store= 'none', $options=array())
Parameter Name Default Value Description
$store 'none' $storage
$options array() $options optional parameters

Defined in

libraries/joomla/session/session.php

Importing

jimport( 'joomla.session.session' );

Source Body

public function __construct($store = 'none', $options = array())
{
        // Need to destroy any existing sessions started with session.auto_start
        if (session_id()) {
                session_unset();
                session_destroy();
        }
 
        // set default sessios save handler
        ini_set('session.save_handler', 'files');
 
        // disable transparent sid support
        ini_set('session.use_trans_sid', '0');
 
        // create handler
        $this->_store = &JSessionStorage::getInstance($store, $options);
 
        // set options
        $this->_setOptions($options);
 
        $this->_setCookieParams();
 
        // load the session
        $this->_start();
 
        // initialise the session
        $this->_setCounter();
        $this->_setTimers();
 
        $this->_state = 'active';
 
        // perform security checks
        $this->_validate();
}



Examples

Code Examples


Advertisement