refactoring classes.

This commit is contained in:
Taylor Otwell
2011-08-15 22:29:11 -05:00
parent 695a8848ed
commit 7225ec0a9e
3 changed files with 35 additions and 14 deletions

View File

@@ -60,9 +60,15 @@ class Session {
{
static::$session = ( ! is_null($id)) ? static::driver()->load($id) : null;
if (static::invalid(static::$session)) static::$session = array('id' => Str::random(40), 'data' => array());
if (static::invalid(static::$session))
{
static::$session = array('id' => Str::random(40), 'data' => array());
}
if ( ! static::has('csrf_token')) static::put('csrf_token', Str::random(16));
if ( ! static::has('csrf_token'))
{
static::put('csrf_token', Str::random(16));
}
static::$session['last_activity'] = time();
}