This post refers to DotKernel 1, based on Zend Framework 1.
If you are looking for DotKernel 3 related posts, go here.

(Available since DotKernel 1.3.0)

The router.xml file stores the router settings. When talking about router settings, we mean modules, controllers (dots) and default actions. If you need other settings, feel free to update the file.

configs/router.xml has the following settings:

  • controllers – the controller(dots) for each module
  • route – stores the default controller for the modules and the default action for the controllers.

Note*: this file must be updated when you:

  • create a new module
  • create a new dots
  • or change the default action of the controller

In the sample below, frontend is the module, Page is the dots and home is the action

configs/router.xml sample code:

<?xml version="1.0" encoding="utf-8"?>
     <!-- all controllers listed here-->
    <!-- 1. for whitelist approach & a secure autoload of all controllers-->
         <!-- default controllers for modules -->
            <!-- default action for controllers ... -->

One Comment

  1. DotKernel Reserved Variable Names for Caching | DotKernel PHP Application Framework

    […] Router is the object that load routes (modules, controllers, actions) settings from router.xml file. More info about router: […]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.