more refactoring and changes.

This commit is contained in:
Taylor Otwell
2011-09-08 17:49:16 -05:00
parent 03654fc5a1
commit abc1fad6c1
34 changed files with 883 additions and 482 deletions

View File

@@ -1,5 +1,7 @@
<?php namespace Laravel\Cache;
use Closure;
abstract class Driver {
/**
@@ -25,7 +27,7 @@ abstract class Driver {
{
if ( ! is_null($item = $this->retrieve($key))) return $item;
return ($default instanceof \Closure) ? call_user_func($default) : $default;
return ($default instanceof Closure) ? call_user_func($default) : $default;
}
/**
@@ -59,7 +61,7 @@ abstract class Driver {
{
if ( ! is_null($item = $this->get($key, null))) return $item;
$default = ($default instanceof \Closure) ? call_user_func($default) : $default;
$default = ($default instanceof Closure) ? call_user_func($default) : $default;
$this->put($key, $default, $minutes);