PHP Classes

File: documentor/predefined_routes_test.php

Recommend this page to a friend!
  Classes of Mark Rolich   PHP URL Router Class   documentor/predefined_routes_test.php   Download  
File: documentor/predefined_routes_test.php
Role: Example script
Content type: text/plain
Description: Documention generator files
Class: PHP URL Router Class
Match URLs with routes for controllers and actions
Author: By
Last change: Update of documentor/predefined_routes_test.php
Date: 4 months ago
Size: 250 bytes
 

Contents

Class file image Download
<?php
$routes
= include 'predefined_routes.php';

$router = new Bike\Router($routes);

$result1 = $router->match('GET', '/news/add.xml/12/some-slug');
$result2 = $router->match('GET', '/news/add/12');
$result3 = $router->match('GET', '/news/add');
?>