aeforge/session 问题修复 & 功能扩展

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

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

aeforge/session

最新稳定版本:V1.0.0

Composer 安装命令:

composer require aeforge/session

包简介

AEForge Session component. Providing a way to deal with session across the application

README 文档

README

AEForge Session component. Providing a way to deal with session across the application.

Installation

To install via composer:

  composer require aeforge/session

To clone the project:

    https://github.com/aeforge/Session.git

Usage/Examples

Example

use Aeforge\Session\Session;

// Start a new session instance
$session = new Session();
// Add expiring time to 60 (in minutes)
$session->register(60);
//Set a normal session key and value
$session->set("session_key", "session_value");
//Set a flashed session key and value (useful for forms errors for example)
$session->flash("flashed_key", "flashed_value");
// Get a normal session value using a key
echo $session->get("hello");
//Get a flashed session value using a key
echo $session->getFlashed("hello");
// Clears both the flash session array and the data session array(normal session)
$session->clear();
// Clear the data array only(normal session)
$session->clearData();
// Clear the flashed array only
$session->clearFlashed();
// Ends the session
$session->destroy();
// Regenerates the session id
$session->regenerate();
// Check if the session expired
$session->isExpired ();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-27