Welcome Guest, Not a member yet? Register   Sign In
CI Router Class...?
#1

[eluser]ZaLiTHkA[/eluser]
I stumbled across this post just now, which got me interested in learning more about how to use this 'router' class [source]:
[quote author="InsiteFX" date="1326637261"]You people should really take a look at the CI Router Class!

Code:
// fetch the Controller!
$controller = $this->CI->router->fetch_class();

// fetch the method!
$method = $this->CI->router->fetch_method();

// fetch the directory!
$directory = $this->CI->router->fetch_directory();

// fetch all controller methods
// --------------------------------------------------------------------

/**
  * get_controller_methods()
  *
  * Description:
  *
  * @access public
         * @param       string
  * @return array
  */
public function get_controller_methods($controller_name)
{
  $ctrl_methods = array();

  $ctrl_methods = get_class_methods($controller_name);

  return $ctrl_methods;
}
[/quote]

After a little bit of digging, I found it to be one of the core classes. I'd like to learn more about this, how it works, why it works that way, etc etc.. Unfortunately I didn't see anything too helpful in my forum search, and the only area of the CI user docs that I can find relating to core classes is how to override or extend them with a simple list of the core classes [link].

Did I maybe miss something in the documentation? Or were these classes designed with the idea of 'internal CI' only stuff?


Messages In This Thread
CI Router Class...? - by El Forum - 10-02-2012, 05:49 AM
CI Router Class...? - by El Forum - 10-02-2012, 07:45 AM
CI Router Class...? - by El Forum - 10-03-2012, 02:24 AM
CI Router Class...? - by El Forum - 10-03-2012, 05:35 AM
CI Router Class...? - by El Forum - 10-03-2012, 07:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB