PHP Classes

File: documentor/in_place_regex.php

Recommend this page to a friend!
  Classes of Mark Rolich   PHP URL Router Class   documentor/in_place_regex.php   Download  
File: documentor/in_place_regex.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/in_place_regex.php
Date: 4 months ago
Size: 269 bytes
 

Contents

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

$router->add('in-place-regex',
    array(
       
'method' => 'GET, POST',
       
'route' => '(/controller<[A-Z]{2}>(/action))'
   
)
);

$result1 = $router->match('GET', '/news/add');
$result2 = $router->match('GET', '/AB/add');
?>