public function setProperAdapter($adapter)
    {
        switch ($adapter) {
            case 'apc':
                $adapter = '\Zest\Cache\Adapter\APC';
                break;
            case 'apcu':
                $adapter = '\Zest\Cache\Adapter\APCU';
                break;
            case 'file':
                $adapter = '\Zest\Cache\Adapter\FileCache';
                break;
            case 'memcache':
                $adapter = '\Zest\Cache\Adapter\Memcache';
                break;
            case 'memcached':
                $adapter = '\Zest\Cache\Adapter\Memcached';
                break;
            case 'redis':
                $adapter = '\Zest\Cache\Adapter\Redis';
                break;
            case 'session':
                $adapter = '\Zest\Cache\Adapter\SessionCache';
                break;

            default:
                $adapter = '\Zest\Cache\Adapter\FileCache';
                break;
        }

        $this->adapter = new $adapter();

        return $this;
    }
public function setProperAdapter($adapter)
    {
        switch ($adapter) {
            case 'apc':
                $adapter = '\Zest\Cache\Adapter\APC';
                break;
            case 'apcu':
                $adapter = '\Zest\Cache\Adapter\APCU';
                break;
            case 'file':
                $adapter = '\Zest\Cache\Adapter\FileCache';
                break;
            case 'memcache':
                $adapter = '\Zest\Cache\Adapter\Memcache';
                break;
            case 'memcached':
                $adapter = '\Zest\Cache\Adapter\Memcached';
                break;
            case 'redis':
                $adapter = '\Zest\Cache\Adapter\Redis';
                break;
            case 'session':
                $adapter = '\Zest\Cache\Adapter\SessionCache';
                break;

            default:
                $adapter = '\Zest\Cache\Adapter\FileCache';
                break;
        }

        $this->adapter = new $adapter();

        return $this;
    }
public function setProperAdapter ( $ adapter ) { switch ( $ adapter ) { case 'apc' : $ adapter = '\Zest\Cache\Adapter\APC' ; break ; case 'apcu' : $ adapter = '\Zest\Cache\Adapter\APCU' ; break ; case 'file' : $ adapter = '\Zest\Cache\Adapter\FileCache' ; break ; case 'memcache' : $ adapter = '\Zest\Cache\Adapter\Memcache' ; break ; case 'memcached' : $ adapter = '\Zest\Cache\Adapter\Memcached' ; break ; case 'redis' : $ adapter = '\Zest\Cache\Adapter\Redis' ; break ; case 'session' : $ adapter = '\Zest\Cache\Adapter\SessionCache' ; break ; default : $ adapter = '\Zest\Cache\Adapter\FileCache' ; break ; } $ this -> adapter = new $ adapter ( ) ; return $ this ; }
Set the valid adapter.

@param (string) $adapter

@since 3.0.0

@return object
Set the valid adapter .