Welcome Guest, Not a member yet? Register   Sign In
how to get method name from controller ?
#1

[eluser]Anton111[/eluser]
I'm trying a new version ;-)
But in old version i used the following code:
Code:
$this->_method = $this->uri->router->fetch_method();
        $this->_class = $this->uri->router->fetch_class();
        $this->_directory = $this->uri->router->fetch_directory();

in the new version this code doesn't work. How can i get class, method and directory name from controller in the new version?
#2

[eluser]tonanbarbarian[/eluser]
the router is now no longer in the uri class
instead you need to do something like
Code:
$RTR =& load_class('Router');
$RTR->fetch_method();
#3

[eluser]Anton111[/eluser]
Oh tnx. it help me.




Theme © iAndrew 2016 - Forum software by © MyBB