ManaPHP\Renderer::exists PHP Method

exists() public method

public exists ( string $template ) : boolean
$template string
return boolean
    public function exists($template)
    {
        foreach ($this->_engines as $extension => $_) {
            $file = $template . $extension;
            if (is_file($file)) {
                if (PHP_EOL !== "\n") {
                    $realPath = str_replace('\\', '/', realpath($file));
                    if ($file !== $realPath) {
                        throw new RendererException('`:real_file` file name does case mismatch for `:wanted_file`', ['real_file' => $realPath, 'wanted_file' => $file]);
                    }
                }
                return true;
            }
        }
        return false;
    }