Download the PHP package bayfrontmedia/session-manager without Composer

On this page you can find all versions of the php package bayfrontmedia/session-manager. 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 session-manager

Session Manager

A framework-agnostic PHP library to manage sessions using multiple storage options.

License

This project is open source and available under the MIT License.

Author

Bayfront Media

Requirements

Installation

Usage

Session handler

A \SessionHandlerInterface must be passed to the Bayfront\SessionManager\Session constructor. There are a variety of session handlers available, each with their own required configuration.

In addition, you may also create and use your own session handlers to be used with Session Manager.

LocalHandler

The LocalHandler allows you to store sessions in the local filesystem using native PHP.

PdoHandler

The PdoHandler allows you to use a PDO instance for session storage in a database.

Before using the PdoHandler, the required database table must be created with the up method, and may throw a Bayfront\SessionManager\HandlerException exception:

Start using Session Manager

Once your handler has been created, it can be used with Session Manager. In addition, a configuration array should be passed to the constructor.

Unless otherwise specified, the default configuration will be used, as shown below:

The cookie_* keys allow you to configure the session cookie parameters.

The sess_regenerate_duration key is the number of seconds interval before a new session is automatically created (prevents session fixation). Set to 0 to disable automatically regenerating sessions.

The sess_lifetime key is the number of seconds the session will be valid. Set to 0 for the session to be valid only "until the browser is closed".

The sess_gc_* keys define the probability and divisor for the garbage cleanup.

NOTE: Be sure to call start before using any other methods to ensure the session has begun.

Public methods


start

Description:

Start a new session.

Parameters:

Returns:

Example:


startNew

Description:

Destroy existing and start a new session.

Parameters:

Returns:

Example:


regenerate

Description:

Regenerate new session ID.

When $delete_old_session = TRUE, the old session file will be deleted.

Parameters:

Returns:

Example:


destroy

Description:

Destroy the current session file and cookie.

Parameters:

Returns:

Example:


getId

Description:

Return current session ID

Parameters:

Returns:

Example:


getLastActive

Description:

Return the last active time of the session.

Parameters:

Returns:

Example:


getLastRegenerate

Description:

Return the last regenerated time of the session.

Parameters:

Returns:

Example:


get

Description:

Returns value of single $_SESSION array key in dot notation, or entire array, with optional default value.

Parameters:

Returns:

Example:


has

Description:

Checks if $_SESSION array key exists in dot notation.

Parameters:

Returns:

Example:


set

Description:

Sets a value for a $_SESSION key in dot notation.

Parameters:

Returns:

Example:

forget

Description:

Remove a single key, or an array of keys from the $_SESSION array using dot notation.

Parameters:

Returns:

Example:


flash

Description:

Sets a value for flash data in dot notation.

Flash data is available immediately and during the subsequent request.

Parameters:

Returns:

Example:


getFlash

Description:

Returns value of single flash data key in dot notation, or entire array, with optional default value.

Parameters:

Returns:

Example:


hasFlash

Description:

Checks if flash data key exists in dot notation.

Parameters:

Returns:

Example:


keepFlash

Description:

Keeps specific flash data keys available for the subsequent request.

Parameters:

Returns:

Example:


reflash

Description:

Keeps all flash data keys available for the subsequent request.

Parameters:

Returns:

Example:


All versions of session-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
bayfrontmedia/php-array-helpers Version ^2.0
bayfrontmedia/php-cookies Version ^2.0
ext-pdo 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 bayfrontmedia/session-manager contains the following files

Loading the files please wait ....