Download the PHP package moviet/session-scary without Composer
On this page you can find all versions of the php package moviet/session-scary. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download moviet/session-scary
More information about moviet/session-scary
Files in moviet/session-scary
Package session-scary
Short Description A simple session organizer library for php
License MIT
Homepage https://github.com/moviet/session-scary
Informations about the package session-scary
Scary - A simple session organizer for php
A very simple session organizer that may help you for handling scary styles on php
Requirements
- Composer for installation
Quick Start
Installation
Release
The current released is only support for handling happy global procedural session
Features
- Create Single Session
- Generate Multiple Session
- Evaluate Session
- Make Auto Increment
- Custom Session Expiration
- Regenerate Session Id
- Remove Session
Usage
Create A Single Session
-
You can follow the humble style like below
the above will equivalent
-
Then to get a single session
Notes :
When you refresh the browser the values will be save in session at first, you may need (eg. token, random, url)
and don't want to lost when the page's refresh, just like common it may useful
Generate Multiple Session
-
You can fashion a session banks on easy away
-
Or you may relax with a free style
-
And then to express your tailor
Notes :
When you refresh the browser the values will be save in session at first, you may need (eg. token, random, url)
and don't want to lost when the page's refresh, just like common it may useful
Evaluate A Session
-
For single session, you can replace with new something
-
And for multiple sets, you can replace like this
Now that was going through changes and you can dump with yayy...
Make Auto Increment
-
For example you may want to make eg. login attempt using a single method
-
Or using multiple series
On above example you will get an auto-increment max. 5 times, start from 0-5
-
If you want to verify eg. session loggedin, you can write like
Notes :
It will return false when session doesn't exists, then you can do something
Custom Session Expiration
-
You can recruit a custom flash message, expirated or any creations
-
Using multiple happy set
Notes :
use ttl or live like examples on above meant the session will expired within 5 minutes
Regenerate Session Id
-
You may doubt with an existing session, you can ensure with this
-
To regenerate session with create new id you can draw this
- Or using this to refresh session_id
Remove Session
-
To remove a single session with work like charm
-
And remove multiple session at once
- Also you can destroy all session and make them gone
Example
Create A Single Session
Create Multiple Session
License
Moviet/session-scary
is released under the MIT public license. See LICENSE for details