PHP code example of drupol / drupal7_session_services
1. Go to this page and download the library: Download drupol/drupal7_session_services library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
drupol / drupal7_session_services example snippets
$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);