PHP code example of lelyfoto / twig-instanceof
1. Go to this page and download the library: Download lelyfoto/twig-instanceof 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/ */
lelyfoto / twig-instanceof example snippets
use Twig\Environment;
use Lelyfoto\Twig\InstanceOf\InstanceOfExtension;
$twig = new Environment($loader);
$twig->addExtension(new InstanceOfExtension());
return [
// ...
Lelyfoto\Twig\InstanceOf\TwigInstanceOfBundle::class => ['all' => true],
// ...
];