public function setResponseTransform(CNabuHTTPResponse $nb_response, string $interface_key = null)
    {
        if ($interface_key === null) {
            $nb_response->setTransformFactory(null);
        } else {
            $nb_engine = CNabuEngine::getEngine();
            $nb_descriptor = $nb_engine->getProviderInterfaceDescriptorByKey(
                CNabuProviderFactory::INTERFACE_RENDER_TRANSFORM,
                $interface_key
            );

            if ($nb_descriptor instanceof CNabuRenderTransformInterfaceDescriptor &&
                ($nb_pool_manager = $nb_engine->getRenderPoolManager()) instanceof CNabuRenderPoolManager &&
                ($nb_transform_factory = $nb_pool_manager->getTransformFactory($nb_descriptor))
                    instanceof CNabuRenderTransformFactory
            ) {
                $nb_response->setTransformFactory($nb_transform_factory);
            } else {
                throw new ENabuRenderException(
                    ENabuRenderException::ERROR_RENDER_TRANSFORM_NOT_FOUND,
                    array($interface_key)
                );
            }
        }

        return $this;
    }