refactoring various classes.
This commit is contained in:
@@ -5,10 +5,6 @@ class APC implements Driver {
|
||||
/**
|
||||
* The APC cache driver instance.
|
||||
*
|
||||
* This session driver relies on the APC cache driver to provide an interface for
|
||||
* working with an APC equipped server. The cache driver will provide all of the
|
||||
* functionality for retrieving and storing items in APC.
|
||||
*
|
||||
* @var Cache\Drivers\APC
|
||||
*/
|
||||
private $apc;
|
||||
|
||||
@@ -57,7 +57,10 @@ class File implements Driver, Sweeper {
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if (file_exists($this->path.$id)) @unlink($this->path.$id);
|
||||
if (file_exists($this->path.$id))
|
||||
{
|
||||
@unlink($this->path.$id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,12 +29,11 @@ class Cookie implements Transporter {
|
||||
*/
|
||||
public function put($id, $config)
|
||||
{
|
||||
// Session cookies may be set to expire on close, which means we will
|
||||
// need to pass "0" into the cookie manager. This will cause the
|
||||
// cookie to not be deleted until the user closes their browser.
|
||||
$minutes = ( ! $config['expire_on_close']) ? $config['lifetime'] : 0;
|
||||
extract($config, EXTR_SKIP);
|
||||
|
||||
\Laravel\Cookie::put(Cookie::key, $id, $minutes, $config['path'], $config['domain'], $config['secure']);
|
||||
$minutes = ( ! $expire_on_close) ? $lifetime : 0;
|
||||
|
||||
\Laravel\Cookie::put(Cookie::key, $id, $minutes, $path, $domain, $secure);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user