定制 nofw/session-handlers 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

nofw/session-handlers

Composer 安装命令:

composer require nofw/session-handlers

包简介

Package providing various SessionHandlerInterface implementations

README 文档

README

Latest Version Build Status Code Coverage Quality Score Total Downloads

Package providing various SessionHandlerInterface implementations.

Install

Via Composer

$ composer require nofw/session-handlers

Usage

This package provides three Session Handler implementations:

  • PSR-6
  • PSR-16
  • Doctrine Cache

Choose your backend and instantiate and register handler.

$cache = new ImaginaryCacheItemPool();
$handler = new \Nofw\Session\CacheSessionHandler($cache);

session_set_save_handler($handler);

Use your session as usual.

Logging

The SessionHandlerInterface does not allow throwing exceptions to indicate failure. Instead it expects the handler to return empty values (empty string or false). However, the PSR-X implementations do throw exceptions. To adhere the interface and to not lose the ability to detect failures, these implementations accept a PSR-3 logger as their second constructor argument and also implement the LoggerAwareInterface.

$cache = new ImaginaryCacheItemPool();
$logger = new Monolog\Logger('nofw')
$handler = new \Nofw\Session\CacheSessionHandler($cache, $logger);

The caught exceptions are logged as errors.

Testing

$ make test

Security

If you discover any security related issues, please contact us at mark.sagikazar@gmail.com.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固