protected static function getTemplate($path)
    {
        if(file_exists($path))
            $template = file_get_contents($path);
        elseif(file_exists(__DIR__ . '/templates/' . $path))
            $template = file_get_contents(__DIR__ . '/templates/' . $path);
        else
            throw new \InvalidArgumentException('Template file not found.');

        return $template;
    }