Skip to content
This repository was archived by the owner on Oct 11, 2019. It is now read-only.
Ayun G. Aribowo edited this page Jul 29, 2016 · 1 revision

Usage

The O2Session uses several session handler to handle the session in the machine. The best way to use it is by include O2Session main class in the header and begin to initialize it accordingly.

Inclusion

Simply use the O2Session main class in the header of the php file.

Example

<?php

use O2System\Session;
...

Initialization

Inside your php class, define the session in your desired variable, then configure it to meet the needs.

Example

<?php

use O2System\Session;

// configure the session, please refer to the configuration page
$config = [
...    
];

// initialize the session
$session = new Session($config);

Manipulating

It is possible to manipulate the session already set using the built in methods. For example, to destroy the session set, we could do it as follows:

$session->destroy();

For more in-depth information about the methods could be used, please see the method documentation page.

Clone this wiki locally