public static function parse($path, $variables = array(), $extension = '.php', $allowDebug = true)
    {
        $tpl = new self();

        $tpl->injectVariables($variables);
        $tpl->setViewName($path);
        $tpl->setConfig("file_extention", $extension);

        if (!(bool)$tpl->getConfig("allow_debug")) {
            $tpl->setConfig("allow_debug", false);
        } else {
            $tpl->setConfig("allow_debug", $allowDebug);
        }

        return $tpl->compile();
    }