laasti/sessions 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laasti/sessions

Composer 安装命令:

composer require laasti/sessions

包简介

README 文档

README

A nice simple session abstraction that works with PSR7 Http Message.

Installation

composer require laasti/sessions

Usage

The package by default stores sessions to filesystem and persists sessions with cookies.

A middleware is responsible to insert the session in the request and to persist it in the response.

The middleware uses a HttpPersisterInterface which does all the background work to manipulate requests and responses.

**A word of caution the id of a session is immutable. Changing the id with withSessionId results in a new instance.

For that reason, it is recommended that only middlewares should mess with the session id and each middleware is responsible for the persistence of its new session.

To ease the process, you can easily reuse the persister across multiple middlewares in case you need to regenerate the session.

The default Cookie persister does not overwrite the cookie if it already exists in the response.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

See Github's releases, or tags

Credits

Author: Sonia Marquette (@nebulousGirl)

License

Released under the MIT License. See LICENSE.txt file.

统计信息

  • 总下载量: 148
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固