public function exists($name, $nest = null)
    {
        $file = str_replace('.', '/', $name);

        $extensions = [
            '.php',
            '.atom.php',
            '.atom',
            '.tpl.php',
        ];

        if (!is_null($nest)) {
            $nest = $nest.'resources/views/';
        } elseif (!is_null($this->nest)) {
            $nest = $this->nest;
        } else {
            $nest = root().'resources/views/';
        }

        $i = 0;
        foreach ($extensions as $extension) {
            $path = $nest.$file.$extension;

            if (file_exists($path)) {
                if ($i == 0) {
                    $view = ['path' => $path, 'engine' => 'none'];
                } elseif ($i == 1 || $i == 2) {
                    $view = ['path' => $path, 'engine' => 'atomium'];
                } elseif ($i == 3) {
                    $view = ['path' => $path, 'engine' => 'smarty'];
                }

                return $view;
            }

            $i++;
        }

        return false;
    }