$config['router_access_mode']= array("View","Controller");
Default is just same Direct Access Url (pure url).
URL : http://yourdomain/path/index
View : doctroot/path/index.php file
If there are directories....
URL : http://yourdomain/mvc/sub/subTemplate
View : doctroot/mvc/sub/subTemplate.php file
Controller is called in view file like below
<?php $Frontend->load("Controller.action"); ?>
<?php $Frontend->load(array("Controller.action","Controller1.action"));?>
$config['router_access_mode']= array("Controller","View");
URL : http://yourdomain/mvc/withoutTemplate
View : doctroot/mvc/withoutTemplate.php file
Controller : CONTROLLER_PATH/mvc.php
controller class: MvcController
action method : withoutTemplate
If there are directories....
URL : http://yourdomain/mvc/sub/subTemplate
View : doctroot/mvc/sub/subTemplate.php file
Controller : CONTROLLER_PATH/mvc/sub.php
controller class: SubController
action method : subTemplate
/*
* if url is starting with profile , Controller is profile and action is userinfo
*/
$config['router_profile']= array('module'=>'profile/:username/:usernumber',
'view'=>'vm/withoutTemplate',
'Controller'=>'vm',
'action'=>'withoutTemplate');
URL : http://yourdomain/profile/thule/1234
View : doctroot/vm/withoutTemplate.php file
Controller : CONTROLLER_PATH/vm.php
Controller class: Vm
action method : withoutTemplate
$config['router_blog']= array('module'=>':blogid',
'view'=>'index',
'Controller'=>'index',
'action'=>'blog');
URL : http://yourdomain/1234
View : doctroot/index.php file
Controller : CONTROLLER_PATH/index.php
Controller class: Index
action method : blog
$config['router_profile']= array('module'=>'profile/:username/:usernumber/<var+value>',
'view'=>'vm/withoutTemplate',
'Controller'=>'vm',
'action'=>'withoutTemplate');
URL : http://yourdomain/profile/thule/1234/aaa/111/bbb/222
View : doctroot/vm/withoutTemplate.php file
Controller : CONTROLLER_PATH/vm.php
Controller class: Vm
action method : withoutTemplate
$config['router_index']= array('module'=>'index*',
'view'=>'index',
'Controller'=>'index',
'action'=>'index');
URL : http://yourdomain/index.php
View : doctroot/index.php file
Controller : CONTROLLER_PATH/index.php
Controller class: Index
action method : index
$config['router_index']= array('module'=>'*index',
'view'=>'index',
'Controller'=>'index',
'action'=>'index');
URL : http://yourdomain/phpindex
View : doctroot/index.php file
Controller : CONTROLLER_PATH/index.php
Controller class: Index
action method : index
$router['blog'] = array('module'=>':userid',
'view'=>'index',
'controller'=>'index',
'action'=>'blog'
);
/*
* if url is starting with profile , controller is vm and action is f1
* uri=>profile/kenneth/1234..
*/
$router['profile'] = array('module'=>'profile/:username/:usernumber',
'view'=>'mvc/withoutTemplate',
'controller'=>'mvc',
'action'=>'profile');
/*
* if url is starting with vm , uri=> vm/var/value/var/value/....
*/
$router['vm'] = array('module'=>'vm/<var+value>',
'view'=>'mvc/withoutTemplate',
'controller'=>'mvc',
'action'=>'vm');
/*
* if url is starting with profilevar , controller is vm and action is f1
* uri=>profilevar/kenneth/1234/var/value/var/value....
*/
$router['profilevar'] = array('module'=>'profilevar/:username/:usernumber/<var+value>',
'view'=>'mvc/withoutTemplate',
'controller'=>'mvc',
'action'=>'profilevar');
/**
* Router has a exception , if url has a one of router_exception , the url should be passed to direct url
*/
$router['viewaccess']= array('module'=>array('errors','elements')); // no controller ,don't through controller in previous.
$router['controlleraccess']= array('module'=>array('*proc','*ajax')); //url finished with proc ,ajax,there is no view, just controller access.