-
Notifications
You must be signed in to change notification settings - Fork 0
Home
O2Session is an Open Source Session Management Driver Library. Permits you to maintain a user’s “state” and track their activity while they browse your site. All but file-based storage require specific server requirements, and a Fatal Exception will be thrown if server requirements are not met. Another amazing product from PT. Lingkar Kreasi (Circle Creative), released under MIT License.
O2Session is build for working more powerfull with O2System Framework, but also can be used for integrated with others as standalone version with limited features.
O2Session is based on CodeIgniter Session Driver, so O2Session is has also functionality similar with them, but a little bit different at the syntax.
- Files
- Database (using O2DB)
- Redis
- Memcached
When a page is loaded, the session class will check to see if valid session cookie is sent by the user’s browser. If a sessions cookie does not exist (or if it doesn’t match one stored on the server or has expired) a new session will be created and saved.
If a valid session does exist, its information will be updated. With each update, the session ID may be regenerated if configured to do so.
It’s important for you to understand that once initialized, the Session class runs automatically. There is nothing you need to do to cause the above behavior to happen. You can, as you can see at the documentation page, work with session data, but the process of reading, writing, and updating a session is automatic.
Under CLI, the Session library will automatically halt itself, as this is a concept based entirely on the HTTP protocol.
Session data is simply an array associated with a particular session ID (cookie).
If you’ve used sessions in PHP before, you should be familiar with PHP’s $_SESSION superglobal (if not, please read the content on that link).
O2Session gives access to its session data through the same means, as it uses the session handlers’ mechanism provided by PHP. Using session data is as simple as manipulating (read, set and unset values) the $_SESSION array.
In addition, O2Session also provides 2 special types of session data that are further explained at the documentation page: flashdata and tempdata.
Please kindly mail us at developer@o2system.in.
Please kindly submit your issues at Github so we can track all the issues along development.
- PHP 5.4+
- Composer
- O2System Glob (O2Glob)
- O2System Database (O2DB)
- Founder and Lead Projects: Steeven Andrian Salim (steevenz.com)
- Wiki Writer: Aradea Hind