Can doophp use autorouting and defined routes together

234 Views Asked by At

Is possible use defined routes and autorouting together? Defined routes must have higher priority than autoroutes.

I tried to use, but after I set autoroutes on, defined routes dont work at all. index.php leaved unchanged:

<?php
include './protected/config/common.conf.php';
include './protected/config/routes.conf.php';
include './protected/config/db.conf.php';

Doo::app()->route = $route;
?>

But work only autoroutes.

1

There are 1 best solutions below

0
On

In common.conf.php $config['AUTOROUTE'] set true.

But don't forget, that autoroute goes first, so if you have controller hello and in autoroute define /hello/:var - it will call HelloController().