dev-master
9999999-dev http://rawphp.orgRawSession provides application session service, including flash messages and is used by RawPHP framework and other applications.
MIT
The Requires
The Development Requires
by Tom Kaczocha
session
RawSession provides application session service, including flash messages and is used by RawPHP framework and other applications.
start()
, close()
, destroy()
and recreate()
add()
, get()
, remove()
RawSession is available via Composer/Packagist., (*3)
Add "rawphp/raw-session": "0.*@dev"
to the require block in your composer.json and then run composer install
., (*4)
{ "require": { "rawphp/raw-session": "0.*@dev" } }
You can also simply run the following from the command line:, (*5)
composer require rawphp/raw-session "0.*@dev"
Alternatively, just copy the contents of the RawSession folder into somewhere that's in your PHP include_path
setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub., (*6)
<?php use RawPHP\RawSession\Session; // optional configuration $config = array( 'auto_start' => FALSE, // should the session be started automatically 'strict' => TRUE, // throw exceptions if there are problems with the session ); // create a new session instance $session = new Session( ); // initialise $session->init( $config ); // start session $session->start( ); // get session ID $id = $session->getID( ); // get session status $status = $session->getStatus( ); // add a value to the session $session->add( 'user_id', 1 ); // get a value from the session $userID = $session->get( 'user_id' ); // remove value from the session $session->remove( 'user_id' ); // destroy the session $session->destroy( ); // destroy and start a new session $session->recreate( );
This package is licensed under the MIT. Read LICENSE for information on the software availability and distribution., (*7)
Please submit bug reports, suggestions and pull requests to the GitHub issue tracker., (*8)
RawSession provides application session service, including flash messages and is used by RawPHP framework and other applications.
MIT
session