PHP Classes

File: tests/compiled.php

Recommend this page to a friend!
  Classes of Mark Rolich   PHP URL Router Class   tests/compiled.php   Download  
File: tests/compiled.php
Role: Auxiliary script
Content type: text/plain
Description: compiled routes for test
Class: PHP URL Router Class
Match URLs with routes for controllers and actions
Author: By
Last change: Update of tests/compiled.php
Date: 3 months ago
Size: 997 bytes
 

Contents

Class file image Download
<?php return array (
 
'controller-action-id' =>
  array (
   
'route' => '/controller/action/#id',
   
'regex' => '/^\/(?P<controller>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\/(?P<action>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\/(?P<id>[0-9]+)$/D',
  ),
 
'controller-action' =>
  array (
   
'route' => '/controller/action',
   
'regex' => '/^\/(?P<controller>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\/(?P<action>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)$/D',
  ),
 
'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',
    ),
   
'regex' => '/^(?:\/(?P<controller>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))?(?:\/(?P<action>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(?:\.(?P<format>[a-z]{2,4}))?)?(?:\/(?P<id>[0-9]+))?(?:\/(?P<slug>[A-Za-z0-9\-]+))?$/D',
  ),
);
?>