PHP Classes

File: documentor/user_defined_token.php

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

Contents

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

$router->addToken('page', '[0-9]+');

$router->add('user-defined-token',
    array(
       
'method' => 'GET, POST',
       
'route' => '(/controller(/action(/page)))'
   
)
);

$result = $router->match('GET', '/news/view/12');
?>