Neos\Flow\Cache\CacheFactory::instantiateFlowSpecificBackend PHP Method

instantiateFlowSpecificBackend() protected method

protected instantiateFlowSpecificBackend ( string $backendObjectName, array $backendOptions ) : AbstractBackend
$backendObjectName string
$backendOptions array
return Neos\Flow\Cache\Backend\AbstractBackend
    protected function instantiateFlowSpecificBackend($backendObjectName, $backendOptions)
    {
        $backend = new $backendObjectName($this->context, $backendOptions);
        if (!$backend instanceof BackendInterface) {
            throw new InvalidBackendException('"' . $backendObjectName . '" is not a valid cache backend object.', 1216304301);
        }
        /** @var FlowAbstractBackend $backend */
        $backend->injectEnvironment($this->environment);
        if (is_callable([$backend, 'injectCacheManager'])) {
            $backend->injectCacheManager($this->cacheManager);
        }
        if (is_callable([$backend, 'initializeObject'])) {
            $backend->initializeObject(ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED);
        }
        return $backend;
    }