API15

JFactory/getSession: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m preparing for archive only
 
Line 50: Line 50:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=getSession
  category=getSession
  category=JFactory
  category=JFactory
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 00:37, 25 March 2017

Description

Get a session object

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

& getSession($options=array())
Parameter Name Default Value Description
$options array() An array containing session options

Returns

object

Defined in

libraries/joomla/factory.php

Importing

jimport( 'joomla.factory' );

Source Body

function &getSession($options = array())
{
        static $instance;

        if (!is_object($instance)) {
                $instance = JFactory::_createSession($options);
        }

        return $instance;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

Code Examples