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;
    }
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;
    }
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 ; }
Tries to load the content of a template file in path. If this is not possible, an
exception is thrown.

@param string $path
@return string
@throws \InvalidArgumentException
Tries to load the content of a template file in path . If this is not possible an exception is thrown .