Slide 25
Slide 25 text
WHAT IS IOC?
\
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);
});
}
}