PHP code example of hautelook / templated-uri-router

1. Go to this page and download the library: Download hautelook/templated-uri-router 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/ */

    

hautelook / templated-uri-router example snippets


use Hautelook\TemplatedUriRouter\Routing\Generator\Rfc6570Generator as TemplateGenerator;

$templateGenerator = new TemplateGenerator($routes, $context);
$templatedUri      = $templateGenerator->generate('hautelook_demo_route', array(
    'page'   => '{page}',
    'sort'   => array('{sort}'),
    'filter' => array('{filter}'),
));