PHP code example of deimos / router

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

    

deimos / router example snippets


$helper  = new \Deimos\Helper\Helper();
$slice  = new \Deimos\Slice\Slice($helper, [
  'default' => [
    'type' => 'pattern',
    'path' => '/demo'
  ]
]);
$router = new \Deimos\Router\Router($slice);

var_dump($router->getCurrentRoute());