Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

00f100/fcphp-session

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

00f100/fcphp-session

Package to manipulate Sessions

Source
Packagist
Version
0.1.3
Version published
Maintainers
1
Created
Source

FcPhp Session

Package to manipulate Session

Build Status codecov Total Downloads

How to install

Composer:

$ composer require 00f100/fcphp-session

or add in composer.json

{
    "require": {
        "00f100/fcphp-session": "*"
    }
}

How to use


use FcPhp\Session\Facades\SessionFacade;

/**
 * Method to return instance of Session 
 *
 * @param array $cookies Cookies default
 * @param string $nonce Nonce to use 00f100/fcphp-crypto
 * @param string $pathKeys Path to save crypto-keys
 * @return void
 */
SessionFacade::getInstance(array $cookies, string $nonce = null, string $pathKeys = null);


// Start session and load cache

$nonce = '...';
$pathKeys = 'var/crypto/keys';

// Use Cache into file
$sessionFile = SessionFacade::getInstance($_COOKIE, $nonce, $pathKeys);

// Create new configuration
$sessionRedis->set('item.config', 'value');

// Print: value
echo $sessionRedis->get('item.config');

/*
Return: 
Array (
    'item' => Array(
        'config' => 'value'
    )
)
*/
print_r($sessionRedis->get());

// Save into Cookie
$sessionRedis->commit();

FAQs

Package last updated on 04 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts