PHP code example of devuri / twigit
1. Go to this page and download the library: Download devuri/twigit 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/ */
devuri / twigit example snippets
// Recommended to define constants upstream for flexibility.
if (\defined('USE_TWIGIT') && true === \constant('USE_TWIGIT')) {
$twig = Twigit\Twigit::init('path/to/mysite', ['autoescape' => 'html']);
// Apply a template filter that overrides traditional theme handling.
$twig->templateFilter();
}