public function setRenderersConfig(array $renderers)
    {
        foreach ($renderers as $name => $class) {
            $renderer = new $class;
            if (!$renderer instanceof RendererInterface) {
                throw new GeneratorServiceException(
                    'Configured class of renderer must implement'
                    . ' Infotech\DocumentGenerator\Renderer\RendererInterface interface'
                );
            }
            $this->registerRenderer($name, $renderer);
        }
    }
public function setRenderersConfig(array $renderers)
    {
        foreach ($renderers as $name => $class) {
            $renderer = new $class;
            if (!$renderer instanceof RendererInterface) {
                throw new GeneratorServiceException(
                    'Configured class of renderer must implement'
                    . ' Infotech\DocumentGenerator\Renderer\RendererInterface interface'
                );
            }
            $this->registerRenderer($name, $renderer);
        }
    }
public function setRenderersConfig ( array $ renderers ) { foreach ( $ renderers as $ name => $ class ) { $ renderer = new $ class ; if ( ! $ renderer instanceof RendererInterface ) { throw new GeneratorServiceException ( 'Configured class of renderer must implement' . ' Infotech\DocumentGenerator\Renderer\RendererInterface interface' ) ; } $ this -> registerRenderer ( $ name , $ renderer ) ; } }
Instantiate and registering document renderers

@param array $renderers Renderers configuration map [name => fully qualified class name]
@throws GeneratorServiceException if map contains name of class that is not implementing RendererInterface
@throws GeneratorServiceException if map contains renderer name that already has been registered
Instantiate and registering document renderers