library/Phalex/Mvc/Application.php
private function getCacheInstance(array $config)
    {
        if (!isset($config['enable']) || !$config['enable']) {
            return null;
        }

        $className = $config['adapter'];
        if (!class_exists($className)) {
            $errMsg = sprintf('Adapter "%s" is not supported for caching', $config['adapter']);
            throw new Exception\RuntimeException($errMsg);
        }
        return new $className($config['options']);
    }
private function getCacheInstance(array $config)
    {
        if (!isset($config['enable']) || !$config['enable']) {
            return null;
        }

        $className = $config['adapter'];
        if (!class_exists($className)) {
            $errMsg = sprintf('Adapter "%s" is not supported for caching', $config['adapter']);
            throw new Exception\RuntimeException($errMsg);
        }
        return new $className($config['options']);
    }
private function getCacheInstance ( array $ config ) { if ( ! isset ( $ config [ 'enable' ] ) || ! $ config [ 'enable' ] ) { return null ; } $ className = $ config [ 'adapter' ] ; if ( ! class_exists ( $ className ) ) { $ errMsg = sprintf ( 'Adapter "%s" is not supported for caching' , $ config [ 'adapter' ] ) ; throw new Exception \ RuntimeException ( $ errMsg ) ; } return new $ className ( $ config [ 'options' ] ) ; }
Get cache instance for config or module
@param array $config
@return null|object
@throws Exception\RuntimeException
Get cache instance for config or module