public function getEngine($name)
    {
        foreach ($this->engines as $engine) {
            if ($engine->supports($name)) {
                return $engine;
            }
        }

        throw new \RuntimeException(sprintf('No engine is able to work with the template "%s".', $name));
    }
public function getEngine($name)
    {
        foreach ($this->engines as $engine) {
            if ($engine->supports($name)) {
                return $engine;
            }
        }

        throw new \RuntimeException(sprintf('No engine is able to work with the template "%s".', $name));
    }
public function getEngine ( $ name ) { foreach ( $ this -> engines as $ engine ) { if ( $ engine -> supports ( $ name ) ) { return $ engine ; } } throw new \ RuntimeException ( sprintf ( 'No engine is able to work with the template "%s".' , $ name ) ) ; }
Get an engine able to render the given template.

@param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance

@return EngineInterface The engine

@throws \RuntimeException if no engine able to work with the template is found
Get an engine able to render the given template .