Coder Social home page Coder Social logo

tobias-trozowski / zend-expressive-session-zf1 Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 14 KB

ZF1 compatible PHP ext-session persistence adapter for zend-expressive-session.

License: MIT License

PHP 100.00%
zf1 zf migration ext-session zendframework zendframework1 zend-expressive session psr-7

zend-expressive-session-zf1's Introduction

Build status Coverage Status

Zend Expressive ZF1 Compatible Session

Provides an ZF1 compatible ext-session persistence adapter for use with zend-expressive-session.

Inspired and based on zend-expressive-session-ext.

Installation

Run the following to install this library::

$ composer require tobias/zend-expressive-session-zf1

Configuration

If your application uses the zend-component-installer Composer plugin, your configuration is complete; the shipped Tobias\Zend\Expressive\Zf1Session\ConfigProvider registers the Tobias\Zend\Expressive\Zf1Session\Persistence\SessionPersistence service, as well as an alias to SessionPersistence it under the name Zend\Expressive\Session\SessionPersistenceInterface.

You can add the Tobias\Zend\Expressive\Zf1Session\ConfigProvider manually to your config/config.php e.g.:

$aggregator = new ConfigAggregator(
    [
        // ...
        
        \Zend\Expressive\Session\ConfigProvider::class,
        \Tobias\Zend\Expressive\Zf1Session\ConfigProvider::class,

        // ...
    ]);

Otherwise, you will need to map Zend\Expressive\Session\SessionPersistenceInterface to Tobias\Zend\Expressive\Zf1Session\Persistence\SessionPersistence in your dependency injection container.

In addition to this you can configure all parameters passed to the session via configuration, e.g. config/autoload/session-params.global.php

<?php
return [
    'session' => [
        'use_cookies' => false,
        'use_only_cookies' => true,
    ]
];

zend-expressive-session-zf1's People

Contributors

tobias-trozowski avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.