PHP Classes

File: documentor/controller_action.php

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

Contents

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

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

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