src/Core/Cache/CacheAdapterFactory.php
public function get($cache = null)
    {
        if (is_null($cache)) {
            $cache = $this->getDefaultCache();
        }

        if ($cache instanceof CacheItemPoolInterface) {
            return $cache;
        }
        if ($cache instanceof CacheInterface) {
            return $cache;
        }

        foreach ($this->callbacks as $callBack) {
            $result = call_user_func($callBack, $cache);
            if ($result instanceof CacheItemPoolInterface) {
                return $result;
            }
            if ($result instanceof CacheInterface) {
                return $result;
            }
        }

        throw new InvalidArgumentException(Message::INVALID_CACHE_ADAPTER);
    }
public function get($cache = null)
    {
        if (is_null($cache)) {
            $cache = $this->getDefaultCache();
        }

        if ($cache instanceof CacheItemPoolInterface) {
            return $cache;
        }
        if ($cache instanceof CacheInterface) {
            return $cache;
        }

        foreach ($this->callbacks as $callBack) {
            $result = call_user_func($callBack, $cache);
            if ($result instanceof CacheItemPoolInterface) {
                return $result;
            }
            if ($result instanceof CacheInterface) {
                return $result;
            }
        }

        throw new InvalidArgumentException(Message::INVALID_CACHE_ADAPTER);
    }
public function get ( $ cache = null ) { if ( is_null ( $ cache ) ) { $ cache = $ this -> getDefaultCache ( ) ; } if ( $ cache instanceof CacheItemPoolInterface ) { return $ cache ; } if ( $ cache instanceof CacheInterface ) { return $ cache ; } foreach ( $ this -> callbacks as $ callBack ) { $ result = call_user_func ( $ callBack , $ cache ) ; if ( $ result instanceof CacheItemPoolInterface ) { return $ result ; } if ( $ result instanceof CacheInterface ) { return $ result ; } } throw new InvalidArgumentException ( Message :: INVALID_CACHE_ADAPTER ) ; }
returns the cache adapter interface for the application cache

@param $cache
@return CacheItemPoolInterface|CacheInterface
@throws \InvalidArgumentException
returns the cache adapter interface for the application cache