PHP code example of germania-kg / twig-requesthandler
1. Go to this page and download the library: Download germania-kg/twig-requesthandler 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/ */
germania-kg / twig-requesthandler example snippets
use Germania\TwigRequestHandler\TwigRequestHandler;
use Twig\Environment as Twig;
use Nyholm\Psr7\Factory\Psr17Factory;
// Dependencies
$twig = new Twig( ... );
$psr17Factory = new Psr17Factory;
// Instantiation
$request_handler = new TwigRequestHandler($twig, $psr17Factory);