Welcome Guest, Not a member yet? Register   Sign In
Get and Override Default Controller Programmatically
#9

[eluser]NeoArc[/eluser]
You can create custom configuration values, when overriding the _set_routing() method of the CI_router class:

Code:
<?php
//core/MY_Router.php

class MY_Router extends CI_Router {

//...

function _set_routing()
{

        //...
        $this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;  
        $this->config->set_item('route_config', $this->routes);
        //...
        }
//...
}


Messages In This Thread
Get and Override Default Controller Programmatically - by El Forum - 07-31-2012, 04:42 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 07:46 AM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 07:53 AM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 10:13 AM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 01:10 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 01:42 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 01:51 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:00 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:08 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:12 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:17 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:24 PM
Get and Override Default Controller Programmatically - by El Forum - 08-01-2012, 02:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB