PHP Classes

File: documentor/static_dynamic.php

Recommend this page to a friend!
  Classes of Mark Rolich   PHP URL Router Class   documentor/static_dynamic.php   Download  
File: documentor/static_dynamic.php
Role: Example script
Content type: text/plain
Description: new test for static and dynamic parts mix in the route
Class: PHP URL Router Class
Match URLs with routes for controllers and actions
Author: By
Last change: Update of documentor/static_dynamic.php
Date: 11 months ago
Size: 259 bytes
 

Contents

Class file image Download
<?php
$router
= new Bike\Router();

$router->add('static-and-dynamic',
    array(
       
'method' => 'GET, POST',
       
'route' => '/r/$subreddit/comments/#thread_id/$thread_slug/'
   
)
);

$result = $router->match('GET', '/r/php/comments/12/router/');
?>