Download the PHP package tobento/service-session without Composer

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

Session Service

Session support for any PHP applications.

Table of Contents

Getting started

Add the latest version of the Session service project running this command.

Requirements

Highlights

Documentation

Create Session

If the saveHandler parameter is null, it uses native session.

Session Factory

You might use the session factory to create the session.

Save Handlers

PDO MySql Save Handler

You might use the PDO mysql save handler to store session data in the database.

Database Table

Create Save Handler

Null Save Handler

You might use the Null save handler for testing purposes.

Validation

Remote Addr Validation

Http User Agent Validation

Stack Validation

You may use the Validations::class to procees multiple validations.

Custom Validation

You may write your own validation by implementing the ValidationInterface:

Start Session

Before storing or retrieving data from the session, you need to start the session. You might use the Session Middleware PSR-15 to do so.

Interacting With Data

set

Stores data in the session.

get

Get data from the session.

has

To determine if an item is present in the session returning a boolean.

delete

Delete data from the session.

deleteAll

Delete all data from the session.

all

Get all data from the session.

Interacting With Flash Data

Works only if the Save Session method is being called on every request end.

flash

Store data in the session for the current and next request.

now

Store data in the session for the current request.

once

Store data in the session. After first retrieving data, the flashed data will be deleted.

Miscellaneous

regenerateId

Regenerates new session id. Use it when changing important user states such as log in and logout.

destroy

Destroys the session altogether but does not regenerate its id.

name

Get the session name.

id

Get the session id.

Save Session

Saves and flashing the session data. You might use the Session Middleware PSR-15 to do so.

Session Middleware PSR-15

You may use the session middleware, which starts the session, adds the session as request attribute and finally calls the save method to save session data.\ Note that the session middleware handles only the SessionExpiredException.\ You may handle SessionStartException and SessionValidationException by your application error handling middleware or write your own session middleware fitting your application.

Credits


All versions of service-session with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
tobento/service-collection Version ^1.0
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 tobento/service-session contains the following files

Loading the files please wait ....