PHP Classes

File: documentor/example_route_setup.php

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

Contents

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

$router->add('controller-action-id',
    array(
       
'method' => 'GET, POST',
       
'route' => '/controller/action/#id'
   
)
);

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

$router->add('controller',
    array(
       
'method' => 'GET, POST',
       
'route' => '/controller'
   
)
);
?>