Slide 23
Slide 23 text
class CacheDecorator implements Storage
{
public function __construct(Cache $cache, Storage $storage)
{…}
public function get($key)
{
return $this->cache->remember($key, 60, function () {
return $this->storage->get($key);
});
}
}
WHAT IS IOC?