2017 © Pedro Peláez
 

library session

Sever Side Persistent Data

image

eden/session

Sever Side Persistent Data

  • Friday, November 13, 2015
  • by cblanquera
  • Repository
  • 4 Watchers
  • 0 Stars
  • 7,617 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

logo Eden Session

Build Status

====, (*1)

, (*2)

Install

composer install eden/session, (*3)

====, (*4)

, (*5)

Introduction

Before using sessions, it's probably a good idea to start the session., (*6)

$session = eden('session')->start();

The session returned is an array object and can be used like a normal array., (*7)

$session['me']    = array('name' => 'John', 'age' => 31);
$session['you']    = array('name' => 'Jane', 'age' => 28);
$session['him']    = array('name' => 'Jack', 'age' => 35);

foreach($session as $key => $value) {
    echo $value['name'];
}

====, (*8)

, (*9)

clear

Removes all session data, (*10)

Usage

eden('session')->clear();

Parameters

Returns Eden\Session\Index, (*11)

====, (*12)

, (*13)

get

Returns data, (*14)

Usage

eden('session')->get(string|null $key);

Parameters

  • string|null $key - The key from the session

Returns scalar|null|array, (*15)

Example

eden('session')->get();

====, (*16)

, (*17)

getId

Returns session id, (*18)

Usage

eden('session')->getId();

Parameters

Returns int, (*19)

====, (*20)

, (*21)

remove

Removes a session., (*22)

Usage

eden('session')->remove(*string $name);

Parameters

  • *string $name - session name

Returns Eden\Session\Index, (*23)

Example

eden('session')->remove('foo');

====, (*24)

, (*25)

set

Sets data, (*26)

Usage

eden('session')->set(*array|string $data, mixed $value);

Parameters

  • *array|string $data - The array data to set
  • mixed $value - If data is a key then this is the value

Returns Eden\Session\Index, (*27)

Example

eden('session')->set(array('foo' => 'bar'));

====, (*28)

, (*29)

setId

Sets the session ID, (*30)

Usage

eden('session')->setId(*int $id);

Parameters

  • *int $id - The prescribed session ID to use

Returns int, (*31)

Example

eden('session')->setId(123);

====, (*32)

, (*33)

start

Starts a session, (*34)

Usage

eden('session')->start();

Parameters

Returns Eden\Session\Index, (*35)

====, (*36)

, (*37)

stop

Starts a session, (*38)

Usage

eden('session')->stop();

Parameters

Returns Eden\Session\Index, (*39)

====, (*40)

, (*41)

Contributing to Eden

Contributions to Eden are following the Github work flow. Please read up before contributing., (*42)

Setting up your machine with the Eden repository and your fork

  1. Fork the repository
  2. Fire up your local terminal create a new branch from the v4 branch of your fork with a branch name describing what your changes are. Possible branch name types:
    • bugfix
    • feature
    • improvement
  3. Make your changes. Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")

Making pull requests

  1. Please ensure to run phpunit before making a pull request.
  2. Push your code to your remote forked version.
  3. Go back to your forked version on GitHub and submit a pull request.
  4. An Eden developer will review your code and merge it in when it has been classified as suitable.

The Versions

13/11 2015

dev-master

9999999-dev http://eden-php.com

Sever Side Persistent Data

  Sources   Download

MIT

The Requires

 

by Christian Blanquera

library eden

13/11 2015

4.x-dev

4.9999999.9999999.9999999-dev http://eden-php.com

Sever Side Persistent Data

  Sources   Download

MIT

The Requires

 

by Christian Blanquera

library eden

13/10 2015

4.0.1

4.0.1.0 http://eden-php.com

Sever Side Persistent Data

  Sources   Download

MIT

The Requires

 

by Christian Blanquera

library eden

07/10 2015

v4

4.0.0.0 http://eden-php.com

Sever Side Persistent Data

  Sources   Download

MIT

The Requires

 

by Christian Blanquera

library eden