Symfony\Component\Templating\PhpEngine::supports PHP Method

supports() public method

Returns true if this class is able to render the given template.
public supports ( mixed $name ) : boolean
$name mixed A template name or a TemplateReferenceInterface instance
return boolean true if this class supports the given resource, false otherwise
    public function supports($name)
    {
        $template = $this->parser->parse($name);

        return 'php' === $template->get('engine');
    }