PHP code example of jorisros / html-compress-twig
1. Go to this page and download the library: Download jorisros/html-compress-twig library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jorisros / html-compress-twig example snippets
$twig = new Twig_Environment($loader);
$twig->addExtension(new \nochso\HtmlCompressTwig\Extension());
// Enable compression regardless of Twig's debug setting
$twig->addExtension(new \nochso\HtmlCompressTwig\Extension(true));