public function buildBackend($type, array $options)
    {
        switch ($type) {
            case 'array':

                return $this->buildArrayCache();

            case 'file':

                return $this->buildFileCache($options);

            case 'chained':

                return $this->buildChainedCache($options);

            case 'null':

                return $this->buildNullCache();

            case 'redis':

                return $this->buildRedisCache($options);

            default:

                throw new Factory\BackendNotFoundException("Cache backend $type not valid");
        }
    }
public function buildBackend($type, array $options)
    {
        switch ($type) {
            case 'array':

                return $this->buildArrayCache();

            case 'file':

                return $this->buildFileCache($options);

            case 'chained':

                return $this->buildChainedCache($options);

            case 'null':

                return $this->buildNullCache();

            case 'redis':

                return $this->buildRedisCache($options);

            default:

                throw new Factory\BackendNotFoundException("Cache backend $type not valid");
        }
    }
public function buildBackend ( $ type , array $ options ) { switch ( $ type ) { case 'array' : return $ this -> buildArrayCache ( ) ; case 'file' : return $ this -> buildFileCache ( $ options ) ; case 'chained' : return $ this -> buildChainedCache ( $ options ) ; case 'null' : return $ this -> buildNullCache ( ) ; case 'redis' : return $ this -> buildRedisCache ( $ options ) ; default : throw new Factory \ BackendNotFoundException ( "Cache backend $type not valid" ) ; } }
Build a specific backend instance.

@param string $type The type of backend you want to create. Eg 'array', 'file', 'chained', 'null', 'redis'.
@param array $options An array of options for the backend you want to create.
@return Backend
@throws Factory\BackendNotFoundException In case the given type was not found.
Build a specific backend instance .