定制 renegare/silexcsh 二次开发

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

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

renegare/silexcsh

Composer 安装命令:

composer require renegare/silexcsh

包简介

Cookie Session Handler for Silex (store session data client side)

README 文档

README

Silex Cookie Session Handler

Build Status Coverage Status

Requirements

Installation

$ composer require renegare/silexcsh:dev-master

Usage Examples:

Silex Usage

<?php

$app = new Silex\Application();

$app->register(new Renegare\SilexCSH\CookieSessionServiceProvider, [
    'session.cookie.options' => [
        'name' => 'CUSTOMNAME', // string
        'lifetime' => 0,        // int
        'path' => '/',          // string
        'domain' => null,       // string
        'secure' => false,      // boolean
        'httponly' => true      // boolean
    ]
]);

$app->get('/doing-nothing', function(Application $app) {
    return 'Nothing going on here with sessions';
});

$app->get('/persist', function(Application $app){
    $app['session']->set('message', 'Hello There!');
    return 'Check your cookie!';
});

$app->get('/read', function(Application $app){
    return print_r($app['session']->all(), true);
});

$app->get('/destroy', function(Application $app) {
    $app['session']->clear();
    return 'Ok Bye Bye!';
});

Test

Check out the repo and from the top level directory run the following command (xdebug required for coverage):

$ composer update && vendor/bin/phpunit --coverage-text

Credits

Inspired by: nelmio/NelmioSecurityBundle

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固