Download the PHP package ujjwal/psr7-http-session without Composer

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

PSR-7 Session

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License

Alternative to PHP's native session handler. It does not depend on PHP's session capability. It can be used with non-typical php based applications like with react/http.

But, why?

But, why?

Getting started

Installation

composer require ujjwal/psr7-http-session

Session Options

name

Type: string Required: true

Name of the session which is used as cookie name. It should only contain alphanumeric characters.

sid_length

Type: integer Default: 40

the length of session ID string. Session ID length can be between 22 to 256.

cookie

Type: array

Used to pass cookie options. See cookie options section.

Cookie Options

domain

Type: string Default: derived from the Host header of request

domain to be set in the session cookie.

path

Type: string Default: /

path to be set in the session cookie.

http_only

Type: boolean Default: true

Marks the cookie as accessible only through the HTTP protocol. This means that the cookie won't be accessible by scripting languages, such as JavaScript.

secure_only

Type: boolean Default: True if the original request is https

It indicates whether cookies should only be sent over secure connections.

lifetime

Type: integer Default: 0 for session cookie

It specifies the lifetime of the cookie in seconds which is sent to the browser. The value 0 means "until the browser is closed." Defaults to 0

same_site

Type: string Default: Lax Specifies SameSite cookie attribute. Very useful to mitigate CSRF by preventing the browser from sending this cookie along with cross-site requests. Allowed values:

Basic operations

Initializing SessionManager

Starting session

Retrieve session id

Regenerate session id

Close session and write to response header as cookie

Retrieving session storage

It implements IteratorAggregate, ArrayAccess, Countable So, it will look very much like $_SESSION. Just replace the $_SESSION occurrences in your app with instance of the object.

Write to session

Read from session

Remove from session

Flush session data

Session Middleware

It also comes with a http middleware which you can use to automatically initialize session and write cookie to response. The middleware is compatible with http-interop/http-middleware based single pass approach or express-like double pass approach.

TODO

License

MIT


All versions of psr7-http-session with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
paragonie/cookie Version ^3.2.0
symfony/options-resolver Version ^3.3
zendframework/zend-math Version ^3.0
psr/http-message Version ^1.0
roave/security-advisories Version dev-master
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 ujjwal/psr7-http-session contains the following files

Loading the files please wait ....