PHP Classes

File: documentor/token_undefined.php

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

Contents

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

$router->addToken('non_static_1', '[a-z]+');
$router->addToken('non_static_2', '[a-z]+');

$router->add('user-defined-token',
    array(
       
'method' => 'GET, POST',
       
'route' => '/non_static_1/undefined/non_static_2'
   
)
);

$result = $router->match('GET', '/some/undefined/tokens');
?>