Download the PHP package horizom/session without Composer

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

Total Downloads Latest Stable Version License

Horizom Session

PHP library for handling sessions.


Requirements

This library is compatible with the PHP versions: 8.0 | 8.1.

Installation

The preferred way to install this extension is through Composer.

To install PHP Session library, simply:

The previous command will only install the necessary files, if you prefer to download the entire source code you can use:

Available Methods

Available methods in this library:

Starts the session

@see https://php.net/session.configuration for List of available $options and their default values

@throws SessionException If headers already sent

@throws SessionException If session already started

@throws SessionException If setting options failed

@Return bool

Check if the session is started

@Return bool

Sets an attribute by name

@throws SessionException If session is unstarted

@Return void

Gets an attribute by name

Optionally defines a default value when the attribute does not exist.

@Return mixed Value

Gets all attributes

@Return array $_SESSION content

Check if an attribute exists in the session

@Return bool

Sets several attributes at once

If attributes exist they are replaced, if they do not exist they are created.

@throws SessionException If session is unstarted

@Return void

Deletes an attribute by name and returns its value

Optionally defines a default value when the attribute does not exist.

@throws SessionException If session is unstarted

@Return mixed Attribute value

Deletes an attribute by name

@throws SessionException If session is unstarted

@Return void

Free all session variables

@throws SessionException If session is unstarted

@Return void

Gets the session ID

@Return string Session ID

Sets the session ID

@throws SessionException If session already started

@Return void

Update the current session id with a newly generated one

@throws SessionException If session is unstarted

@Return bool

Gets the session name

@Return string Session name

Sets the session name

@throws SessionException If session already started

@Return void

Destroys the session

@throws SessionException If session is unstarted

@Return bool

Quick Start

To use this library with Composer:

Or instead you can use a facade to access the methods statically:

Usage

Example of use for this library:

- Starts the session

Without setting options:

Setting options:

Using the facade:

- Check if the session is started

Using session object:

Using the facade:

- Sets an attribute by name

Using session object:

Using the facade:

- Gets an attribute by name

Without default value if attribute does not exist:

With default value if attribute does not exist:

Using the facade:

- Gets all attributes

Using session object:

Using the facade:

- Check if an attribute exists in the session

Using session object:

Using the facade:

- Sets several attributes at once

Using session object:

Using the facade:

- Deletes an attribute by name and returns its value

Without default value if attribute does not exist:

With default value if attribute does not exist:

Using the facade:

- Deletes an attribute by name

Using session object:

Using the facade:

- Free all session variables

Using session object:

Using the facade:

- Gets the session ID

Using session object:

Using the facade:

- Sets the session ID

Using session object:

Using the facade:

- Update the current session id with a newly generated one

Regenerate ID without deleting the old session:

Regenerate ID by deleting the old session:

Using the facade:

- Gets the session name

Using session object:

Using the facade:

- Sets the session name

Using session object:

Using the facade:

- Destroys the session

Using session object:

Using the facade:

License

This repository is licensed under the MIT License.


All versions of session with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 horizom/session contains the following files

Loading the files please wait ....