PHP code example of buzzingpixel / twig-smartypants
1. Go to this page and download the library: Download buzzingpixel/twig-smartypants 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/ */
buzzingpixel / twig-smartypants example snippets
declare(strict_types=1);
use corbomite\di\Di;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
use buzzingpixel\twigsmartypants\SmartypantsTwigExtension;
$twig = new Environment(new FilesystemLoader('/path/to/templates'), [
'debug' => true,
'cache' => '/path/to/cache',
'strict_variables' => true,
]);
$twig->addExtension(Di::get(SmartypantsTwigExtension::class));