various refactorings.

This commit is contained in:
Taylor Otwell
2011-11-02 21:27:43 -05:00
parent 128984facb
commit 9caf239f6b
29 changed files with 275 additions and 150 deletions

View File

@@ -182,6 +182,16 @@ class Session {
static::$exists = false;
}
/**
* Get the CSRF token that is stored in the session data.
*
* @return string
*/
public static function token()
{
return static::get('csrf_token');
}
/**
* Store the session payload in storage.
*
@@ -196,9 +206,6 @@ class Session {
$config = Config::$items['session'];
// To keep the session persistence code clean, session drivers are
// responsible for the storage of the session array to the various
// available persistent storage mechanisms.
$driver->save(static::$session, $config, static::$exists);
static::cookie();