<?php

namespace Simulador\Utils;

use Twig\Environment;
use Twig\Loader\FilesystemLoader;
use Twig\Extra\Intl\IntlExtension;

class Twig
{

    public static function get()
    {

        $twigFolder = $_SERVER['DOCUMENT_ROOT'] . '/v1/classes/Tables/Messages/';
        $loader = new FilesystemLoader($twigFolder);
        $twig = new Environment($loader, [
            'cache' => false,
        ]);
        $twig->addExtension(new IntlExtension());

        return $twig;
    }
}
