Symfony\Component\Templating\PhpEngine::exists PHP 메소드

exists() 공개 메소드

Returns true if the template exists.
public exists ( mixed $name ) : boolean
$name mixed A template name or a TemplateReferenceInterface instance
리턴 boolean true if the template exists, false otherwise
    public function exists($name)
    {
        try {
            $this->load($name);
        } catch (\InvalidArgumentException $e) {
            return false;
        }

        return true;
    }