sFire PHP Framework

Plain session driver

sFire\Session\Driver\Plain is an driver for sFire\Session\Session and is based on the PHP $_SESSION to store and retrieve data.

In this section we will handle:

  • Setting the session driver
  • Usagesession

Setting the session driver

To set-up the session driver, you need to inject the driver into a new instance of sFire\Session\Session. You can do so by injecting the driver into the constructor, or by calling the setDriver method.

Constructor
use sFire\Session\Session;

$session = new Session('Plain');
Set driver
use sFire\Session\Session;

$session = new Session();
$session -> setDriver('Plain');

Usage

For the documentation about the usage of this driver, you can view the sFire\Session\Session.