PHP code example of cf-git / twig-once
1. Go to this page and download the library: Download cf-git/twig-once 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/ */
cf-git / twig-once example snippets
$twig = new \Twig\Environment($loader, $config);
$twig->addExtension(new \CFGit\TwigEngine\Extensions\Once\OnceExtension())
$twig = new \Twig\Environment($loader, $config);
$twig->addTokenParser(new \CFGit\TwigEngine\Extensions\Once\OnceTokenParser());