File: app/Config/router.php

Recommend this page to a friend!
  Classes of Slawomir Kaleta  >  Dframe Demo  >  app/Config/router.php  >  Download  
File: app/Config/router.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Dframe Demo
Application to demonstrate the Dframe framework
Author: By
Last change: Update of app/Config/router.php
Date: 6 months ago
Size: 1,474 bytes
 

Contents

Class file image Download
<?php

return [
   
'https' => false,
   
'NAME_CONTROLLER' => 'page', // Default Controller for router
   
'NAME_METHOD' => 'index', // Default Action for router
   
'publicWeb' => '', // Path for public web (web or public_html)
   
'annotation' => false,

   
'assets' => [
       
'minifyCssEnabled' => true,
       
'minifyJsEnabled' => true,
       
'assetsDir' => 'assets',
       
'assetsPath' => APP_DIR . 'View/',
       
'cacheDir' => 'cache',
       
'cachePath' => APP_DIR . '../web/',
       
'cacheUrl' => HTTP_HOST . '/',
    ],

   
'routes' => [
       
'documents/:pageId' => [
           
'documents/[pageId]/',
           
'task=page&action=show&pageId=[pageId]'
       
],

       
'error/:code' => [
           
'error/[code]/',
           
'task=page&action=error&type=[code]',
           
'code' => '([0-9]+)',
           
'args' => [
               
'code' => '[code]'
           
]
        ],

       
':task/:action' => [
           
'[task]/[action]/[params]',
           
'task=[task]&action=[action]',
           
'params' => '(.*)',
           
'_params' => [
               
'[name]/[value]/',
               
'[name]=[value]'
           
]
        ],

       
'default' => [
           
'[task]/[action]/[params]',
           
'task=[task]&action=[action]',
           
'params' => '(.*)',
           
'_params' => [
               
'[name]/[value]/',
               
'[name]=[value]'
           
]
        ]
    ]

];


For more information send a message to info at phpclasses dot org.