Webiny\Component\ClassLoader\ClassLoader::registerCacheDriver PHP 메소드

registerCacheDriver() 공개 메소드

Unregister the old ClassLoader::getClass autoload method.
public registerCacheDriver ( CacheStorage $cache )
$cache Webiny\Component\Cache\CacheStorage Instance of the \Webiny\Component\Cache\Cache class.
    public function registerCacheDriver(CacheStorage $cache)
    {
        // set cache
        $this->cache = $cache;
        // unregister the old autoloader
        spl_autoload_unregister([self::$instance, 'getClass']);
        // prepend the new cache autoloader
        spl_autoload_register([self::$instance, 'getClassFromCache'], true, true);
    }