Mecha CMS

Deep learning on using the API.

Class Session

Author: Taufik Nurrohman · 72 Views

Tweet

Persistent storage using sessions.

Table of Content

Set 

Session::set($key, $value = "");

Set a session:

Session::set('my_session', 'the value');

Reset 

Session::reset($key = null);

Remove a session:

Session::reset('my_session');

Remove multiple sessions:

Session::reset(['my_session', 'your_session', 'our_session']);

Remove all sessions:

Session::reset();

Get 

Session::get($key = null, $fail = null);

Get a session:

Session::get('my_session', '#');

Get all sessions:

Session::get();

0 Comments

No comments yet.