Back to Session class

Method __construct

public
__construct
(\Joomla\Session\StorageInterface $store = null, \Joomla\Event\DispatcherInterface $dispatcher = null, array $options = [])
Constructor
Parameters
  • \Joomla\Session\StorageInterface $store A StorageInterface implementation.
  • \Joomla\Event\DispatcherInterface $dispatcher DispatcherInterface for the session to use.
  • array $options Optional parameters. Supported keys include: - name: The session name - id: The session ID - expire: The session lifetime in seconds
Since
  • 1.0
Class: Session
Project: Joomla

Method __construct - Source code

/**
 * Constructor
 *
 * @param   StorageInterface     $store       A StorageInterface implementation.
 * @param   DispatcherInterface  $dispatcher  DispatcherInterface for the session to use.
 * @param   array                $options     Optional parameters. Supported keys include:
 *                                            - name: The session name
 *                                            - id: The session ID
 *                                            - expire: The session lifetime in seconds
 *
 * @since   1.0
 */
public function __construct(StorageInterface $store = null, DispatcherInterface $dispatcher = null, array $options = [])
{
    // Extra hash the name of the session for b/c with Joomla 3.x or the session is never found.
    if (isset($options['name'])) {
        $options['name'] = md5($options['name']);
    }
    parent::__construct($store, $dispatcher, $options);
}