Download the PHP package mmdm/sim-session without Composer

On this page you can find all versions of the php package mmdm/sim-session. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sim-session

Simplicity Session

A library for session management.

Features

Install

composer

Or you can simply download zip file from github and extract it, then put file to your project library and use it like other libraries.

Just add line below to autoload files:

and you are good to go.

How to use

Note: When you instantiate new session object, it will start session if it did not started yet.

Use with Crypt library

If you need more security on sessions, use Crypt library.

If you don't need some of your sessions to be secure, pass false as last parameter of set methods.

Available functions

This method starts session. To regenerate it, pass true as first argument.

NOTE: It checks if session is started yet, if not then start it.

NOTE: By default it'll not delete previous session but you can make this happen by send boolean as second parameter.

This method close a started session.

This method check if PHP session has started.

This method set $key to session with $value. To prevent encrypting when Crypt is specified through construct method, pass false as last parameter to not encrypt $value.

Note: To store multidimensional array in session, $key can be dotted separated strings.

exp. foo.bar => $_SESSION['foo']['bar'].

This method get value of $key from session. If there is no session with key of $key it will return $prefer instead that can be specified through second argument - default is NULL.

Note: To get multidimensional array from session, $key can be dotted separated strings.

exp. foo.bar => $_SESSION['foo']['bar'].

This method removes value of $key from session.

Note: To remove multidimensional array from session, $key can be dotted separated strings.

exp. foo.bar => $_SESSION['foo']['bar'].

This method checks if $key is exists in sessions.

Note: To check multidimensional array in session, $key can be dotted separated strings.

exp. foo.bar => $_SESSION['foo']['bar'].

This method is like simple set method, the only difference is $time. With this feature you can define timer for a session value. Default value is 300 seconds.

This method is like simple get method.

This method is like simple remove method. The only difference is you can pass NULL to remove all timer sessions

This method is like simple has method.

This method is like simple set method.

This method is like simple get method. The only difference is after get a flash session, default behavior is to remove that session, but you can make it not to remove through last parameter.

This method is like simple remove method. The only difference is you can pass NULL to remove all timer sessions

This method is like simple has method.

Dependencies

There is just one dependency and it is Crypt library. With this feature, if any session hijacking happens, they can't see actual data because it is encrypted.

License

Under MIT license.


All versions of sim-session with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
mmdm/sim-crypt Version ^1.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mmdm/sim-session contains the following files

Loading the files please wait ....