PHPackages                             rcastera/session - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rcastera/session

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rcastera/session
================

Session Class

v1.0.1(11y ago)212.2k10[1 issues](https://github.com/rcastera/Session-Class/issues)[1 PRs](https://github.com/rcastera/Session-Class/pulls)1MITPHPPHP &gt;=5.3.0

Since Sep 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/rcastera/Session-Class)[ Packagist](https://packagist.org/packages/rcastera/session)[ Docs](http://www.richardcastera.com)[ RSS](/packages/rcastera-session/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (1)

Session Class
=============

[](#session-class)

This is a Session class for you guessed it, managing sessions. Back in the day, when there weren't many open source frameworks on the market, developers had to code things from scratch to achieve certain functionality. This class's inception, is the from one of those instances. With this class you can easily time-out your authenticated users after a specified interval.

### Setup

[](#setup)

---

Add a `composer.json` file to your project:

```
{
  "require": {
      "rcastera/session": "v1.0.0"
  }
}
```

Then provided you have [composer](http://getcomposer.org) installed, you can run the following command:

```
$ composer.phar install
```

That will fetch the library and its dependencies inside your vendor folder. Then you can add the following to your .php files in order to use the library (if you don't already have one).

```
require 'vendor/autoload.php';
```

Then you need to `use` the relevant class, and instantiate the class. For example:

### Getting Started

[](#getting-started)

---

```
require 'vendor/autoload.php';

use rcastera\Browser\Session\Session;

$session = new Session();
```

### Examples

[](#examples)

---

##### Logging in. (login.php)

[](#logging-in-loginphp)

```
