PHP Classes

File: documentor/predefined_routes.php

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

Contents

Class file image Download
<?php
return array(
   
'controller-action-id' => array(
       
'route' => '/controller/action/#id'
   
),
   
'controller-action' => array(
       
'route' => '/controller/action'
   
),
   
'general' => array(
       
'route' => '(/controller)(/action(.format<[a-z]{2,4}>))(/#id)(/slug<[A-Za-z0-9\-]+>)',
       
'defaults' => array(
           
'controller' => 'index',
           
'action' => 'index',
           
'format' => 'html',
           
'id' => 1,
           
'slug' => 'default-slug'
       
)
    )
);
?>