2017 © Pedro Peláez
 

library drupal7_session_services

Provides Session services to connect to Drupal 7 session management.

image

drupol/drupal7_session_services

Provides Session services to connect to Drupal 7 session management.

  • Tuesday, February 27, 2018
  • by drupol
  • Repository
  • 1 Watchers
  • 0 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Drupal 7 Session Services

This library provides a session storage handler for using the Drupal 7 session mechanism with HTTPFoundation Symfony's session component., (*2)

If you need to use Drupal 7 and a library that rely on Symfony's HTTPFoundation component for handling sessions, you will need this to share session information between the library and Drupal., (*3)

Installation

composer require drupol/drupal7_session_services

Usage

  session:
    class: Symfony\Component\HttpFoundation\Session\Session
    arguments: ['@session_storage', '@attribute_bags', '@flash_bag']

  session_storage:
    class: Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage
    arguments: [[], '@session_handler', null]

  session_handler:
    class: drupol\drupal7_session_services\Session\Storage\Handler\Drupal7SessionHandler

  attribute_bags:
    class: Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag

  flash_bag:
    class: Symfony\Component\HttpFoundation\Session\Flash\FlashBag

or with PHP:, (*4)

  $drupal7SessionHandler = new \drupol\drupal7_session_services\Session\Storage\Handler\Drupal7SessionHandler();
  $sessionstorage = new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $drupal7SessionHandler, null);
  $attributeBag = new \Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag();
  $flashBag = new \Symfony\Component\HttpFoundation\Session\Flash\FlashBag();

  $session = new \Symfony\Component\HttpFoundation\Session\Session($sessionstorage, $attributeBag, $flashBag);

Run the tests

composer install
./vendor/bin/grumphp run

The Versions

27/02 2018

dev-master

9999999-dev

Provides Session services to connect to Drupal 7 session management.

  Sources   Download

MIT EUPL

The Requires

  • php ^5.6 || ^7.0 || ^7.1

 

The Development Requires

27/02 2018

0.1.0

0.1.0.0

Provides Session services to connect to Drupal 7 session management.

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0 || ^7.1

 

The Development Requires