Download the PHP package effectra/session without Composer
On this page you can find all versions of the php package effectra/session. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download effectra/session
More information about effectra/session
Files in effectra/session
Download effectra/session
More information about effectra/session
Files in effectra/session
Vendor effectra
Package session
Short Description The Effectra Session package.
License MIT
Homepage https://www.effectra.com
Package session
Short Description The Effectra Session package.
License MIT
Homepage https://www.effectra.com
Please rate this library. Is it a good library?
Informations about the package session
Effectra Session
The Session
class represents a session and provides methods for session management.
Table of Contents
- Installation
- Usage
- Methods
- Example
Installation
You can install the Session
class via Composer by running the following command:
Usage
To use the Session
class, you need to include it in your PHP file:
Methods
The Session
class provides the following methods:
start()
: Starts the session.save()
: Saves and closes the session.isActive()
: Checks if the session is active.get(string $key, mixed $default = null)
: Retrieves the value for the given key from the session.has(string $key): bool
: Checks if the given key exists in the session.regenerate(): bool
: Regenerates the session ID.put(string $key, mixed $value)
: Sets a value in the session for the given key.forget(string $key)
: Removes the value for the given key from the session.flash(string $key, array $messages)
: Sets a flash message in the session for the given key.getFlash(string $key): array
: Retrieves the flash message for the given key from the session.
Example
Here's an example of how to use the Session
class:
All versions of session with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.0.2
The package effectra/session contains the following files
Loading the files please wait ....