PHP code example of nymo / silex-twig-country-extension

1. Go to this page and download the library: Download nymo/silex-twig-country-extension 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/ */

    

nymo / silex-twig-country-extension example snippets


$app->register(new Silex\Provider\TwigServiceProvider(), array(
        'twig.path' => 'your view path',
        'twig.options' => array(
            "cache" => 'your cache path'
        )
    ));

$twig = $app['twig'];
$twig->addExtension(new \nymo\Twig\Extension\CountryExtension($app));